Class: GraphQL::Stitching::PlannerStep
- Inherits:
-
Object
- Object
- GraphQL::Stitching::PlannerStep
- Defined in:
- lib/graphql/stitching/planner_step.rb
Constant Summary collapse
- GRAPHQL_PRINTER =
GraphQL::Language::Printer.new
Instance Attribute Summary collapse
-
#after ⇒ Object
Returns the value of attribute after.
-
#boundary ⇒ Object
Returns the value of attribute boundary.
-
#if_type ⇒ Object
readonly
Returns the value of attribute if_type.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
-
#parent_type ⇒ Object
readonly
Returns the value of attribute parent_type.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#selections ⇒ Object
Returns the value of attribute selections.
-
#variables ⇒ Object
Returns the value of attribute variables.
Instance Method Summary collapse
-
#initialize(location:, parent_type:, index:, after: nil, operation_type: "query", selections: [], variables: {}, path: [], if_type: nil, boundary: nil) ⇒ PlannerStep
constructor
A new instance of PlannerStep.
- #to_plan_op ⇒ Object
Constructor Details
#initialize(location:, parent_type:, index:, after: nil, operation_type: "query", selections: [], variables: {}, path: [], if_type: nil, boundary: nil) ⇒ PlannerStep
Returns a new instance of PlannerStep.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/graphql/stitching/planner_step.rb', line 11 def initialize( location:, parent_type:, index:, after: nil, operation_type: "query", selections: [], variables: {}, path: [], if_type: nil, boundary: nil ) @location = location @parent_type = parent_type @index = index @after = after @operation_type = operation_type @selections = selections @variables = variables @path = path @if_type = if_type @boundary = boundary end |
Instance Attribute Details
#after ⇒ Object
Returns the value of attribute after.
9 10 11 |
# File 'lib/graphql/stitching/planner_step.rb', line 9 def after @after end |
#boundary ⇒ Object
Returns the value of attribute boundary.
9 10 11 |
# File 'lib/graphql/stitching/planner_step.rb', line 9 def boundary @boundary end |
#if_type ⇒ Object (readonly)
Returns the value of attribute if_type.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def if_type @if_type end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def index @index end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def location @location end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def operation_type @operation_type end |
#parent_type ⇒ Object (readonly)
Returns the value of attribute parent_type.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def parent_type @parent_type end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/graphql/stitching/planner_step.rb', line 8 def path @path end |
#selections ⇒ Object
Returns the value of attribute selections.
9 10 11 |
# File 'lib/graphql/stitching/planner_step.rb', line 9 def selections @selections end |
#variables ⇒ Object
Returns the value of attribute variables.
9 10 11 |
# File 'lib/graphql/stitching/planner_step.rb', line 9 def variables @variables end |
Instance Method Details
#to_plan_op ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/graphql/stitching/planner_step.rb', line 35 def to_plan_op GraphQL::Stitching::Plan::Op.new( step: @index, after: @after, location: @location, operation_type: @operation_type, selections: rendered_selections, variables: rendered_variables, path: @path, if_type: @if_type, boundary: @boundary, ) end |