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