Sha256: 5f3d163a0c6c12f9bb9c42960de69a8eff6be4556615985617ac5f60ce44f387
Contents?: true
Size: 583 Bytes
Versions: 53
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true module GraphQL module StaticValidation module DirectivesAreDefined def initialize(*) super @directive_names = context.warden.directives.map(&:graphql_name) end def on_directive(node, parent) if !@directive_names.include?(node.name) add_error(GraphQL::StaticValidation::DirectivesAreDefinedError.new( "Directive @#{node.name} is not defined", nodes: node, directive: node.name )) else super end end end end end
Version data entries
53 entries across 53 versions & 2 rubygems