Class: GraphQL::Query::SerialExecution::ValueResolution::BaseResolution
- Inherits:
-
Object
- Object
- GraphQL::Query::SerialExecution::ValueResolution::BaseResolution
- Defined in:
- lib/graphql/query/serial_execution/value_resolution.rb
Direct Known Subclasses
HasPossibleTypeResolution, ListResolution, NonNullResolution, ObjectResolution, ScalarResolution
Instance Attribute Summary collapse
-
#execution_context ⇒ Object
readonly
Returns the value of attribute execution_context.
-
#field_type ⇒ Object
readonly
Returns the value of attribute field_type.
-
#irep_node ⇒ Object
readonly
Returns the value of attribute irep_node.
-
#parent_type ⇒ Object
readonly
Returns the value of attribute parent_type.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #get_strategy_for_kind(*args) ⇒ Object
-
#initialize(value, field_type, target, parent_type, irep_node, execution_context) ⇒ BaseResolution
constructor
A new instance of BaseResolution.
- #non_null_result ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(value, field_type, target, parent_type, irep_node, execution_context) ⇒ BaseResolution
Returns a new instance of BaseResolution.
12 13 14 15 16 17 18 19 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 12 def initialize(value, field_type, target, parent_type, irep_node, execution_context) @value = value @field_type = field_type @target = target @parent_type = parent_type @irep_node = irep_node @execution_context = execution_context end |
Instance Attribute Details
#execution_context ⇒ Object (readonly)
Returns the value of attribute execution_context.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def execution_context @execution_context end |
#field_type ⇒ Object (readonly)
Returns the value of attribute field_type.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def field_type @field_type end |
#irep_node ⇒ Object (readonly)
Returns the value of attribute irep_node.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def irep_node @irep_node end |
#parent_type ⇒ Object (readonly)
Returns the value of attribute parent_type.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def parent_type @parent_type end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def target @target end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 10 def value @value end |
Instance Method Details
#get_strategy_for_kind(*args) ⇒ Object
30 31 32 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 30 def get_strategy_for_kind(*args) GraphQL::Query::SerialExecution::ValueResolution.get_strategy_for_kind(*args) end |
#non_null_result ⇒ Object
26 27 28 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 26 def non_null_result raise NotImplementedError, "Should return a value based on initialization params" end |
#result ⇒ Object
21 22 23 24 |
# File 'lib/graphql/query/serial_execution/value_resolution.rb', line 21 def result return nil if value.nil? || value.is_a?(GraphQL::ExecutionError) non_null_result end |