Sha256: 750dde187ac89cb11f9542bb0d95119c7ab91c2bbb0c606302d7f8edfec14a57

Contents?: true

Size: 304 Bytes

Versions: 10

Compression:

Stored size: 304 Bytes

Contents

GraphQL::INT_TYPE = GraphQL::ScalarType.define do
  name "Int"
  description "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1."

  coerce_input ->(value) { value.is_a?(Numeric) ? value.to_i : nil }
  coerce_result ->(value) { value.to_i }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
graphql-1.2.6 lib/graphql/int_type.rb
graphql-1.2.5 lib/graphql/int_type.rb
graphql-1.2.4 lib/graphql/int_type.rb
graphql-1.2.3 lib/graphql/int_type.rb
graphql-1.2.2 lib/graphql/int_type.rb
graphql-1.2.1 lib/graphql/int_type.rb
graphql-1.2.0 lib/graphql/int_type.rb
graphql-1.1.0 lib/graphql/int_type.rb
graphql-1.0.0 lib/graphql/int_type.rb
graphql-0.19.4 lib/graphql/int_type.rb