Class: GraphQL::Query::SerialExecution::OperationResolution
- Inherits:
-
Object
- Object
- GraphQL::Query::SerialExecution::OperationResolution
- Defined in:
- lib/graphql/query/serial_execution/operation_resolution.rb
Instance Attribute Summary collapse
-
#execution_context ⇒ Object
readonly
Returns the value of attribute execution_context.
-
#irep_node ⇒ Object
readonly
Returns the value of attribute irep_node.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(irep_node, target, execution_context) ⇒ OperationResolution
constructor
A new instance of OperationResolution.
- #result ⇒ Object
Constructor Details
#initialize(irep_node, target, execution_context) ⇒ OperationResolution
Returns a new instance of OperationResolution.
7 8 9 10 11 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 7 def initialize(irep_node, target, execution_context) @target = target @irep_node = irep_node @execution_context = execution_context end |
Instance Attribute Details
#execution_context ⇒ Object (readonly)
Returns the value of attribute execution_context.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def execution_context @execution_context end |
#irep_node ⇒ Object (readonly)
Returns the value of attribute irep_node.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def irep_node @irep_node end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def target @target end |
Instance Method Details
#result ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 13 def result execution_context.strategy.selection_resolution.new( execution_context.query.root_value, target, irep_node, execution_context ).result rescue GraphQL::InvalidNullError => err err.parent_error? || execution_context.add_error(err) nil end |