Class: GraphQL::Query::FieldResolutionStrategy::NonNullResolutionStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/graph_ql/query/field_resolution_strategy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#resultObject (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