Class: GraphQL::Execution::Execute

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/execution/execute.rb

Overview

A valid execution strategy

Defined Under Namespace

Modules: FieldResolveStep

Constant Summary collapse

PROPAGATE_NULL =
:__graphql_propagate_null__

Instance Method Summary collapse

Instance Method Details

#execute(ast_operation, root_type, query) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/graphql/execution/execute.rb', line 8

def execute(ast_operation, root_type, query)
  result = resolve_selection(
    query.root_value,
    root_type,
    query.irep_selection,
    query.context,
    mutation: query.mutation?
  )

  GraphQL::Execution::Lazy.resolve(result)

  result.to_h
end