Class: GraphQL::Query::FieldResolutionStrategy::NonNullResolutionStrategy
- Inherits:
-
Object
- Object
- GraphQL::Query::FieldResolutionStrategy::NonNullResolutionStrategy
- Defined in:
- lib/graph_ql/query/field_resolution_strategy.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(value, field_type, target, parent_type, ast_field, operation_resolver) ⇒ NonNullResolutionStrategy
constructor
A new instance of NonNullResolutionStrategy.
Constructor Details
#initialize(value, field_type, target, parent_type, ast_field, operation_resolver) ⇒ NonNullResolutionStrategy
Returns a new instance of NonNullResolutionStrategy.
69 70 71 72 73 74 75 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 69 def initialize(value, field_type, target, parent_type, ast_field, operation_resolver) wrapped_type = field_type.of_type resolved_type = wrapped_type.kind.resolve(wrapped_type, value) strategy_class = GraphQL::Query::FieldResolutionStrategy.get_strategy_for_kind(resolved_type.kind) inner_strategy = strategy_class.new(value, resolved_type, target, parent_type, ast_field, operation_resolver) @result = inner_strategy.result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
68 69 70 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 68 def result @result end |