Sha256: 5ef8db07c834cc2574ff5c697d76da80b4c8c109a308d1ee708d3c09a815fc63

Contents?: true

Size: 588 Bytes

Versions: 77

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  class Query
    class VariableValidationError < GraphQL::ExecutionError
      attr_accessor :value, :validation_result

      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

      def to_h
        super.merge({ "value" => value, "problems" => validation_result.problems })
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
graphql-1.8.18 lib/graphql/query/variable_validation_error.rb
graphql-1.8.17 lib/graphql/query/variable_validation_error.rb
graphql-1.8.16 lib/graphql/query/variable_validation_error.rb
graphql-1.8.15 lib/graphql/query/variable_validation_error.rb
graphql-1.8.14 lib/graphql/query/variable_validation_error.rb
graphql-1.9.0.pre2 lib/graphql/query/variable_validation_error.rb
graphql-1.8.13 lib/graphql/query/variable_validation_error.rb
graphql-1.8.12 lib/graphql/query/variable_validation_error.rb
graphql-1.9.0.pre1 lib/graphql/query/variable_validation_error.rb
graphql-1.8.11 lib/graphql/query/variable_validation_error.rb
graphql-1.8.10 lib/graphql/query/variable_validation_error.rb
graphql-1.8.9 lib/graphql/query/variable_validation_error.rb
graphql-1.8.8 lib/graphql/query/variable_validation_error.rb
graphql-1.8.7 lib/graphql/query/variable_validation_error.rb
graphql-1.8.6 lib/graphql/query/variable_validation_error.rb
graphql-1.8.5 lib/graphql/query/variable_validation_error.rb
graphql-1.8.4 lib/graphql/query/variable_validation_error.rb
graphql-1.8.3 lib/graphql/query/variable_validation_error.rb
graphql-1.8.2 lib/graphql/query/variable_validation_error.rb
graphql-1.8.1 lib/graphql/query/variable_validation_error.rb