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
-
#ast_operation_definition ⇒ Object
readonly
Returns the value of attribute ast_operation_definition.
-
#execution_context ⇒ Object
readonly
Returns the value of attribute execution_context.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(ast_operation_definition, target, execution_context) ⇒ OperationResolution
constructor
A new instance of OperationResolution.
- #result ⇒ Object
Constructor Details
#initialize(ast_operation_definition, 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(ast_operation_definition, target, execution_context) @ast_operation_definition = ast_operation_definition @target = target @execution_context = execution_context end |
Instance Attribute Details
#ast_operation_definition ⇒ Object (readonly)
Returns the value of attribute ast_operation_definition.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def ast_operation_definition @ast_operation_definition end |
#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 |
#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 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 13 def result selections = ast_operation_definition.selections execution_context.strategy.selection_resolution.new( execution_context.query.root_value, target, selections, execution_context ).result end |