Exception: GraphQL::Query::VariableValidationError

Inherits:
ExecutionError
  • Object
show all
Defined in:
lib/graphql/query.rb

Direct Known Subclasses

VariableMissingError

Instance Attribute Summary

Attributes inherited from ExecutionError

#ast_node

Instance Method Summary collapse

Methods inherited from ExecutionError

#to_h

Constructor Details

#initialize(variable_ast, type, reason) ⇒ VariableValidationError

Returns a new instance of VariableValidationError.



10
11
12
13
14
# File 'lib/graphql/query.rb', line 10

def initialize(variable_ast, type, reason)
  msg = "Variable #{variable_ast.name} of type #{type} #{reason}"
  super(msg)
  self.ast_node = variable_ast
end