Class: GraphQL::StaticValidation::FragmentsAreNamed

Inherits:
Object
  • Object
show all
Includes:
Message::MessageHelper
Defined in:
lib/graphql/static_validation/rules/fragments_are_named.rb

Instance Method Summary collapse

Methods included from Message::MessageHelper

#message

Instance Method Details

#validate(context) ⇒ Object



7
8
9
# File 'lib/graphql/static_validation/rules/fragments_are_named.rb', line 7

def validate(context)
  context.visitor[GraphQL::Language::Nodes::FragmentDefinition] << ->(node, parent) { validate_name_exists(node, context) }
end