Class: GraphQL::Query::SerialExecution::ValueResolution::ListResolution
- Inherits:
-
BaseResolution
- Object
- BaseResolution
- GraphQL::Query::SerialExecution::ValueResolution::ListResolution
- Defined in:
- lib/graphql/query/serial_execution/value_resolution.rb
Instance Attribute Summary
Attributes inherited from BaseResolution
#ast_field, #execution_context, #field_type, #parent_type, #target, #value
Instance Method Summary collapse
-
#non_null_result ⇒ Object
For each item in the list, Resolve it with the “wrapped” type of this list.
Methods inherited from BaseResolution
#get_strategy_for_kind, #initialize, #result
Constructor Details
This class inherits a constructor from GraphQL::Query::SerialExecution::ValueResolution::BaseResolution
Instance Method Details
#non_null_result ⇒ Object
For each item in the list, Resolve it with the “wrapped” type of this list
45 46 47 48 49 50 51 52 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 45 def non_null_result wrapped_type = field_type.of_type strategy_class = get_strategy_for_kind(wrapped_type.kind) value.map do |item| inner_strategy = strategy_class.new(item, wrapped_type, target, parent_type, ast_field, execution_context) inner_strategy.result end end |