Class: GraphQL::Stitching::Plan::Op

Inherits:
Struct
  • Object
show all
Defined in:
lib/graphql/stitching/plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#afterObject

Returns the value of attribute after

Returns:

  • (Object)

    the current value of after



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def after
  @after
end

#if_typeObject

Returns the value of attribute if_type

Returns:

  • (Object)

    the current value of if_type



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def if_type
  @if_type
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def location
  @location
end

#operation_typeObject

Returns the value of attribute operation_type

Returns:

  • (Object)

    the current value of operation_type



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def operation_type
  @operation_type
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def path
  @path
end

#resolverObject

Returns the value of attribute resolver

Returns:

  • (Object)

    the current value of resolver



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def resolver
  @resolver
end

#selectionsObject

Returns the value of attribute selections

Returns:

  • (Object)

    the current value of selections



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def selections
  @selections
end

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def step
  @step
end

#variablesObject

Returns the value of attribute variables

Returns:

  • (Object)

    the current value of variables



8
9
10
# File 'lib/graphql/stitching/plan.rb', line 8

def variables
  @variables
end

Instance Method Details

#as_jsonObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/graphql/stitching/plan.rb', line 20

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