Method: GraphQL::StaticValidation::VariablesAreUsedAndDefined#on_fragment_spread

Defined in:
lib/graphql/static_validation/rules/variables_are_used_and_defined.rb

#on_fragment_spread(node, parent) ⇒ Object

For FragmentSpreads:

  • find the context on the stack
  • mark the context as containing this spread


59
60
61
62
63
# File 'lib/graphql/static_validation/rules/variables_are_used_and_defined.rb', line 59

def on_fragment_spread(node, parent)
  variable_context = @variable_context_stack.last
  @spreads_for_context[variable_context] << node.name
  super
end