module GraphQL::StaticValidation::FragmentsAreNamed

Public Instance Methods

on_fragment_definition(node, _parent) click to toggle source
Calls superclass method
# File lib/graphql/static_validation/rules/fragments_are_named.rb, line 5
def on_fragment_definition(node, _parent)
  if node.name.nil?
    add_error(GraphQL::StaticValidation::FragmentsAreNamedError.new(
      "Fragment definition has no name",
      nodes: node
    ))
  end
  super
end