Sha256: dfda670542b456a2ad0309d76a3788521bbb135bcafd41e0acfab332eff048f9

Contents?: true

Size: 179 Bytes

Versions: 12

Compression:

Stored size: 179 Bytes

Contents

GraphQL::INT_TYPE = GraphQL::ScalarType.define do
  name "Int"
  coerce_input -> (value) { value.is_a?(Numeric) ? value.to_i : nil }
  coerce_result -> (value) { value.to_i }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
graphql-0.16.1 lib/graphql/int_type.rb
graphql-0.16.0 lib/graphql/int_type.rb
graphql-0.15.3 lib/graphql/int_type.rb
graphql-0.15.2 lib/graphql/int_type.rb
graphql-0.14.2 lib/graphql/int_type.rb
graphql-0.15.1 lib/graphql/int_type.rb
graphql-0.15.0 lib/graphql/int_type.rb
graphql-0.14.1 lib/graphql/int_type.rb
graphql-0.14.0 lib/graphql/int_type.rb
graphql-0.13.0 lib/graphql/int_type.rb
graphql-0.12.1 lib/graphql/int_type.rb
graphql-0.12.0 lib/graphql/int_type.rb