Class: GraphQL::Query::SerialExecution::ValueResolution::HasPossibleTypeResolution
- Inherits:
-
BaseResolution
- Object
- BaseResolution
- GraphQL::Query::SerialExecution::ValueResolution::HasPossibleTypeResolution
- Defined in:
- lib/graphql/query/serial_execution/value_resolution.rb
Instance Attribute Summary
Attributes inherited from BaseResolution
#execution_context, #field_type, #irep_node, #parent_type, #target, #value
Instance Method Summary collapse
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
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 56 def non_null_result resolved_type = field_type.resolve_type(value, execution_context) unless resolved_type.is_a?(GraphQL::ObjectType) raise GraphQL::ObjectType::UnresolvedTypeError.new(irep_node.definition.name, field_type, parent_type) end strategy_class = get_strategy_for_kind(resolved_type.kind) inner_strategy = strategy_class.new(value, resolved_type, target, parent_type, irep_node, execution_context) inner_strategy.result end |