Class: GraphQL::Query::SerialExecution

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/query/serial_execution.rb,
lib/graphql/query/serial_execution/field_resolution.rb,
lib/graphql/query/serial_execution/value_resolution.rb,
lib/graphql/query/serial_execution/operation_resolution.rb,
lib/graphql/query/serial_execution/selection_resolution.rb

Defined Under Namespace

Modules: OperationResolution, SelectionResolution, ValueResolution Classes: FieldResolution

Instance Method Summary collapse

Instance Method Details

#execute(ast_operation, root_type, query_object) ⇒ 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



18
19
20
21
22
23
24
# File 'lib/graphql/query/serial_execution.rb', line 18

def execute(ast_operation, root_type, query_object)
  operation_resolution.resolve(
    query_object.irep_selection,
    root_type,
    query_object
  )
end

#field_resolutionObject



26
27
28
# File 'lib/graphql/query/serial_execution.rb', line 26

def field_resolution
  self.class::FieldResolution
end

#operation_resolutionObject



30
31
32
# File 'lib/graphql/query/serial_execution.rb', line 30

def operation_resolution
  self.class::OperationResolution
end

#selection_resolutionObject



34
35
36
# File 'lib/graphql/query/serial_execution.rb', line 34

def selection_resolution
  self.class::SelectionResolution
end