Class: GraphQL::Stitching::Plan::Op
- Inherits:
-
Object
- Object
- GraphQL::Stitching::Plan::Op
- Defined in:
- lib/graphql/stitching/plan.rb
Instance Attribute Summary collapse
-
#after ⇒ Object
readonly
Returns the value of attribute after.
-
#if_type ⇒ Object
readonly
Returns the value of attribute if_type.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#resolver ⇒ Object
readonly
Returns the value of attribute resolver.
-
#selections ⇒ Object
readonly
Returns the value of attribute selections.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_json ⇒ Object
-
#initialize(step:, after:, location:, operation_type:, selections:, variables: nil, path: nil, if_type: nil, resolver: nil) ⇒ Op
constructor
A new instance of Op.
Constructor Details
#initialize(step:, after:, location:, operation_type:, selections:, variables: nil, path: nil, if_type: nil, resolver: nil) ⇒ Op
Returns a new instance of Op.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/graphql/stitching/plan.rb', line 19 def initialize( step:, after:, location:, operation_type:, selections:, variables: nil, path: nil, if_type: nil, resolver: nil ) @step = step @after = after @location = location @operation_type = operation_type @selections = selections @variables = variables @path = path @if_type = if_type @resolver = resolver end |
Instance Attribute Details
#after ⇒ Object (readonly)
Returns the value of attribute after.
10 11 12 |
# File 'lib/graphql/stitching/plan.rb', line 10 def after @after end |
#if_type ⇒ Object (readonly)
Returns the value of attribute if_type.
16 17 18 |
# File 'lib/graphql/stitching/plan.rb', line 16 def if_type @if_type end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
11 12 13 |
# File 'lib/graphql/stitching/plan.rb', line 11 def location @location end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type.
12 13 14 |
# File 'lib/graphql/stitching/plan.rb', line 12 def operation_type @operation_type end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
15 16 17 |
# File 'lib/graphql/stitching/plan.rb', line 15 def path @path end |
#resolver ⇒ Object (readonly)
Returns the value of attribute resolver.
17 18 19 |
# File 'lib/graphql/stitching/plan.rb', line 17 def resolver @resolver end |
#selections ⇒ Object (readonly)
Returns the value of attribute selections.
13 14 15 |
# File 'lib/graphql/stitching/plan.rb', line 13 def selections @selections end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
9 10 11 |
# File 'lib/graphql/stitching/plan.rb', line 9 def step @step end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
14 15 16 |
# File 'lib/graphql/stitching/plan.rb', line 14 def variables @variables end |
Instance Method Details
#==(other) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/graphql/stitching/plan.rb', line 55 def ==(other) step == other.step && after == other.after && location == other.location && operation_type == other.operation_type && selections == other.selections && variables == other.variables && path == other.path && if_type == other.if_type && resolver == other.resolver end |
#as_json ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/graphql/stitching/plan.rb', line 41 def as_json { step: step, after: after, location: location, operation_type: operation_type, selections: selections, variables: variables, path: path, if_type: if_type, resolver: resolver }.tap(&:compact!) end |