Sha256: 4d1f0cf8ba67cc0592e5c46f0c65b3cbf1e8e1f200891c79bcf63c77f633cb12

Contents?: true

Size: 558 Bytes

Versions: 43

Compression:

Stored size: 558 Bytes

Contents

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

43 entries across 43 versions & 1 rubygems

Version Path
graphql-1.2.6 lib/graphql/query/variable_validation_error.rb
graphql-1.2.5 lib/graphql/query/variable_validation_error.rb
graphql-1.2.4 lib/graphql/query/variable_validation_error.rb
graphql-1.2.3 lib/graphql/query/variable_validation_error.rb
graphql-1.2.2 lib/graphql/query/variable_validation_error.rb
graphql-1.2.1 lib/graphql/query/variable_validation_error.rb
graphql-1.2.0 lib/graphql/query/variable_validation_error.rb
graphql-1.1.0 lib/graphql/query/variable_validation_error.rb
graphql-1.0.0 lib/graphql/query/variable_validation_error.rb
graphql-0.19.4 lib/graphql/query/variable_validation_error.rb
graphql-0.19.3 lib/graphql/query/variable_validation_error.rb
graphql-0.19.2 lib/graphql/query/variable_validation_error.rb
graphql-0.19.1 lib/graphql/query/variable_validation_error.rb
graphql-0.19.0 lib/graphql/query/variable_validation_error.rb
graphql-0.18.15 lib/graphql/query/variable_validation_error.rb
graphql-0.18.14 lib/graphql/query/variable_validation_error.rb
graphql-0.18.13 lib/graphql/query/variable_validation_error.rb
graphql-0.18.12 lib/graphql/query/variable_validation_error.rb
graphql-0.18.11 lib/graphql/query/variable_validation_error.rb
graphql-0.18.10 lib/graphql/query/variable_validation_error.rb