Sha256: e03b9c22663fa06623e2240720a58cfd0ec5ab88e62472d388a1106b71b0f7b4

Contents?: true

Size: 306 Bytes

Versions: 23

Compression:

Stored size: 306 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

23 entries across 23 versions & 1 rubygems

Version Path
graphql-0.19.3 lib/graphql/int_type.rb
graphql-0.19.2 lib/graphql/int_type.rb
graphql-0.19.1 lib/graphql/int_type.rb
graphql-0.19.0 lib/graphql/int_type.rb
graphql-0.18.15 lib/graphql/int_type.rb
graphql-0.18.14 lib/graphql/int_type.rb
graphql-0.18.13 lib/graphql/int_type.rb
graphql-0.18.12 lib/graphql/int_type.rb
graphql-0.18.11 lib/graphql/int_type.rb
graphql-0.18.10 lib/graphql/int_type.rb
graphql-0.18.9 lib/graphql/int_type.rb
graphql-0.18.8 lib/graphql/int_type.rb
graphql-0.18.7 lib/graphql/int_type.rb
graphql-0.18.6 lib/graphql/int_type.rb
graphql-0.18.5 lib/graphql/int_type.rb
graphql-0.18.4 lib/graphql/int_type.rb
graphql-0.18.3 lib/graphql/int_type.rb
graphql-0.18.2 lib/graphql/int_type.rb
graphql-0.18.1 lib/graphql/int_type.rb
graphql-0.18.0 lib/graphql/int_type.rb