Class: GraphQL::StaticValidation::DirectivesAreDefined
- Inherits:
-
Object
- Object
- GraphQL::StaticValidation::DirectivesAreDefined
- Includes:
- Message::MessageHelper
- Defined in:
- lib/graphql/static_validation/rules/directives_are_defined.rb
Instance Method Summary collapse
Methods included from Message::MessageHelper
Instance Method Details
#validate(context) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/graphql/static_validation/rules/directives_are_defined.rb', line 7 def validate(context) directive_names = context.schema.directives.keys context.visitor[GraphQL::Language::Nodes::Directive] << ->(node, parent) { validate_directive(node, directive_names, context) } end |