Class: Mj::GraphQL::ThorCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/mj/graphql/thor_command.rb

Instance Method Summary collapse

Instance Method Details

#query_file(file) ⇒ Object



11
12
13
14
15
# File 'lib/mj/graphql/thor_command.rb', line 11

def query_file(file)
  handler = Commands::QueryFileCommandHandler.new
  data = handler.handle(Commands::QueryFileCommand.new(file, options))
  $stdout.puts JSON.generate(data)
end