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.
64 65 66 67 68 69 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 64 def initialize(value, field_type, target, parent_type, ast_field, operation_resolver) wrapped_type = field_type.of_type strategy_class = FIELD_TYPE_KIND_STRATEGIES[wrapped_type.kind] inner_strategy = strategy_class.new(value, wrapped_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.
63 64 65 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 63 def result @result end |