Sha256: 10ed63ae09227801a8d36cf03cbbbb405192ff0295f89e079a9de3a461db0420
Contents?: true
Size: 480 Bytes
Versions: 36
Compression:
Stored size: 480 Bytes
Contents
# frozen_string_literal: true module GraphQL module Types class BigInt < GraphQL::Schema::Scalar description "Represents non-fractional signed whole numeric values. Since the value may exceed the size of a 32-bit integer, it's encoded as a string." def self.coerce_input(value, _ctx) value && Integer(value) rescue ArgumentError nil end def self.coerce_result(value, _ctx) value.to_i.to_s end end end end
Version data entries
36 entries across 36 versions & 1 rubygems