Exception: GraphQL::IntegerEncodingError
- Inherits:
-
RuntimeTypeError
- Object
- StandardError
- Error
- RuntimeTypeError
- GraphQL::IntegerEncodingError
- Defined in:
- lib/graphql/integer_encoding_error.rb
Overview
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 identifiersGraphQL::Types::BigInt
for really big integer values
Instance Attribute Summary collapse
-
#integer_value ⇒ Object
readonly
The value which couldn’t be encoded.
Instance Method Summary collapse
-
#initialize(value) ⇒ IntegerEncodingError
constructor
A new instance of IntegerEncodingError.
Constructor Details
#initialize(value) ⇒ IntegerEncodingError
Returns a new instance of IntegerEncodingError.
15 16 17 18 |
# File 'lib/graphql/integer_encoding_error.rb', line 15 def initialize(value) @integer_value = value super("Integer out of bounds: #{value}. \nConsider using ID or GraphQL::Types::BigInt instead.") end |
Instance Attribute Details
#integer_value ⇒ Object (readonly)
The value which couldn’t be encoded
13 14 15 |
# File 'lib/graphql/integer_encoding_error.rb', line 13 def integer_value @integer_value end |