Class: GraphQL::IntegerDecodingError

Inherits:
RuntimeTypeError
  • Object
show all
Defined in:
lib/graphql/integer_decoding_error.rb

Overview

This error is raised when Types::Int is given an input value outside of 32-bit integer range.

For really big integer values, consider GraphQL::Types::BigInt

See GraphQL::Types::Int which raises this error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ IntegerDecodingError

: (Integer value) -> void



16
17
18
19
# File 'lib/graphql/integer_decoding_error.rb', line 16

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

Instance Attribute Details

#integer_value ⇒ Object (readonly)

The value which couldn't be decoded : Integer



13
14
15
# File 'lib/graphql/integer_decoding_error.rb', line 13

def integer_value
  @integer_value
end