class GraphQL::IntegerEncodingError
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:
-
IDfor database primary keys or other identifiers -
GraphQL::Types::BigIntfor really big integer values
See GraphQL::Types::Int which raises this error
Attributes
Returns
-
GraphQL::Schema::Field— The field that returned a too-big integer
The value which couldn’t be encoded
Public Class Methods
Source
# File lib/graphql/integer_encoding_error.rb, line 26 def initialize(value, context:) @integer_value = value @field = context[:current_field] @path = context[:current_path] message = "Integer out of bounds: #{value}".dup if @path message << " @ #{@path.join(".")}" end if @field message << " (#{@field.path})" end message << ". Consider using ID or GraphQL::Types::BigInt instead." super(message) end
Calls superclass method