Sha256: 262188f4703bf1a014d2bda1167dc7019465b4f79becace68231c8794403919d

Contents?: true

Size: 684 Bytes

Versions: 67

Compression:

Stored size: 684 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  # This error is raised when `Types::Int` is asked to return a value outside of 32-bit integer range.
  #
  # For values outside that range, consider:
  #
  # - `ID` for database primary keys or other identifiers
  # - `GraphQL::Types::BigInt` for really big integer values
  #
  # @see GraphQL::Types::Int which raises this error
  class IntegerEncodingError < GraphQL::RuntimeTypeError
    # The value which couldn't be encoded
    attr_reader :integer_value

    def initialize(value)
      @integer_value = value
      super("Integer out of bounds: #{value}. \nConsider using ID or GraphQL::Types::BigInt instead.")
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
graphql-1.10.6 lib/graphql/integer_encoding_error.rb
graphql-1.10.5 lib/graphql/integer_encoding_error.rb
graphql-1.10.4 lib/graphql/integer_encoding_error.rb
graphql-1.10.3 lib/graphql/integer_encoding_error.rb
graphql-1.10.2 lib/graphql/integer_encoding_error.rb
graphql-1.9.19 lib/graphql/integer_encoding_error.rb
graphql-1.10.1 lib/graphql/integer_encoding_error.rb
graphql-1.10.0 lib/graphql/integer_encoding_error.rb
graphql-1.10.0.pre4 lib/graphql/integer_encoding_error.rb
graphql-1.9.18 lib/graphql/integer_encoding_error.rb
graphql-1.10.0.pre3 lib/graphql/integer_encoding_error.rb
graphql-1.9.17 lib/graphql/integer_encoding_error.rb
graphql-1.10.0.pre2 lib/graphql/integer_encoding_error.rb
graphql-1.9.16 lib/graphql/integer_encoding_error.rb
graphql-1.9.15 lib/graphql/integer_encoding_error.rb
graphql-1.9.14 lib/graphql/integer_encoding_error.rb
graphql-1.10.0.pre1 lib/graphql/integer_encoding_error.rb
graphql-1.9.13 lib/graphql/integer_encoding_error.rb
graphql-1.9.12 lib/graphql/integer_encoding_error.rb
graphql-1.9.11 lib/graphql/integer_encoding_error.rb