forked from rmosolgo/graphql-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rmosolgo#3206 from toneymathews/refactor-scalar-in…
…t-to-spec Bind scalar int as per spec
- Loading branch information
Showing
5 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
module GraphQL | ||
# 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 | ||
class IntegerDecodingError < GraphQL::RuntimeTypeError | ||
# The value which couldn't be decoded | ||
attr_reader :integer_value | ||
|
||
def initialize(value) | ||
@integer_value = value | ||
super("Integer out of bounds: #{value}. \nConsider using GraphQL::Types::BigInt instead.") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters