Module: GraphQL::Query::SerialExecution::SelectionResolution

Defined in:
lib/graphql/query/serial_execution/selection_resolution.rb

Class Method Summary collapse

Class Method Details

.resolve(target, current_type, selection, query_ctx) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/graphql/query/serial_execution/selection_resolution.rb', line 6

def self.resolve(target, current_type, selection, query_ctx)
  selection_result = {}

  selection.typed_children[current_type].each do |name, subselection|
    selection_result.merge!(query_ctx.execution_strategy.field_resolution.new(
      subselection,
      current_type,
      target,
      query_ctx
    ).result)
  end

  selection_result
end