Class: GraphQL::Query::ValueResolution::ListResolution

Inherits:
BaseResolution
  • Object
show all
Defined in:
lib/graphql/query/value_resolution.rb

Instance Attribute Summary

Attributes inherited from BaseResolution

#ast_field, #execution_strategy, #field_type, #parent_type, #query, #target, #value

Instance Method Summary collapse

Methods inherited from BaseResolution

#initialize

Constructor Details

This class inherits a constructor from GraphQL::Query::ValueResolution::BaseResolution

Instance Method Details

#resultObject



33
34
35
36
37
38
39
40
41
# File 'lib/graphql/query/value_resolution.rb', line 33

def result
  wrapped_type = field_type.of_type
  value.map do |item|
    resolved_type = wrapped_type.kind.resolve(wrapped_type, item)
    strategy_class = GraphQL::Query::ValueResolution.get_strategy_for_kind(resolved_type.kind)
    inner_strategy = strategy_class.new(item, resolved_type, target, parent_type, ast_field, query, execution_strategy)
    inner_strategy.result
  end
end