Method: GraphQL::Query::BaseExecution#execute

Defined in:
lib/graphql/query/base_execution.rb

#execute(ast_operation, root_type, query_obj) ⇒ Hash

This is the only required method for an Execution strategy. You could create a custom execution strategy and configure your schema to use that custom strategy instead.

Parameters:

Returns:

  • (Hash)

    a spec-compliant GraphQL result, as a hash



15
16
17
18
# File 'lib/graphql/query/base_execution.rb', line 15

def execute(ast_operation, root_type, query_obj)
  resolver = operation_resolution.new(ast_operation, root_type, query_obj, self)
  resolver.result
end