Sha256: 92073aafc9bfcfd075b1f0b25f3ce5351f5876d202149615aafa4afb980de4b4
Contents?: true
Size: 471 Bytes
Versions: 28
Compression:
Stored size: 471 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) Integer(value) rescue ArgumentError nil end def self.coerce_result(value, _ctx) value.to_i.to_s end end end end
Version data entries
28 entries across 28 versions & 1 rubygems