class GraphQL::StaticValidation::DirectivesAreDefinedError
Attributes
Public Class Methods
(String message, directive: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/directives_are_defined_error.rb, line 11 def initialize(message, directive:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @directive_name = directive #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/directives_are_defined_error.rb, line 30 def code "undefinedDirective" end
# File lib/graphql/static_validation/rules/directives_are_defined_error.rb, line 18 def to_h extensions = { "code" => code, "directiveName" => directive_name } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h