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_strategy ⇒ Object
readonly
Returns the value of attribute execution_strategy.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(ast_operation_definition, target, query, execution_strategy) ⇒ OperationResolution
constructor
A new instance of OperationResolution.
- #result ⇒ Object
Constructor Details
#initialize(ast_operation_definition, target, query, execution_strategy) ⇒ OperationResolution
Returns a new instance of OperationResolution.
7 8 9 10 11 12 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 7 def initialize(ast_operation_definition, target, query, execution_strategy) @ast_operation_definition = ast_operation_definition @query = query @target = target @execution_strategy = execution_strategy 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_strategy ⇒ Object (readonly)
Returns the value of attribute execution_strategy.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def execution_strategy @execution_strategy end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
5 6 7 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 5 def query @query 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
14 15 16 17 18 |
# File 'lib/graphql/query/serial_execution/operation_resolution.rb', line 14 def result selections = ast_operation_definition.selections resolver = execution_strategy.selection_resolution.new(nil, target, selections, query, execution_strategy) resolver.result end |