class GraphQL::StaticValidation::VariableUsagesAreAllowedError
Attributes
Public Class Methods
(String message, type: String, name: String, argument: String, error: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb, line 17 def initialize(message, type:, name:, argument:, error:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @type_name = type #: String @variable_name = name #: String @argument_name = argument #: String @error_message = error #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb, line 42 def code "variableMismatch" end
# File lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb, line 27 def to_h extensions = { "code" => code, "variableName" => variable_name, "typeName" => type_name, "argumentName" => argument_name, "errorMessage" => error_message } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h