class GraphQL::Query::VariableValidationError
Attributes
validation_result[RW]
value[RW]
Public Class Methods
new(variable_ast, type, value, validation_result)
click to toggle source
Calls superclass method
GraphQL::ExecutionError.new
# File lib/graphql/query/variable_validation_error.rb, line 6 def initialize(variable_ast, type, value, validation_result) @value = value @validation_result = validation_result msg = "Variable #{variable_ast.name} of type #{type} was provided invalid value" super(msg) self.ast_node = variable_ast end
Public Instance Methods
to_h()
click to toggle source
Calls superclass method
GraphQL::ExecutionError#to_h
# File lib/graphql/query/variable_validation_error.rb, line 15 def to_h super.merge({ "value" => value, "problems" => validation_result.problems }) end