Sha256: 42952c07b5970e32808095b9bd98956af1f392c4dabe28917fdd5caf3f68ad0e

Contents?: true

Size: 331 Bytes

Versions: 23

Compression:

Stored size: 331 Bytes

Contents

GraphQL::FLOAT_TYPE = GraphQL::ScalarType.define do
  name "Float"
  description "Represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point)."

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

Version data entries

23 entries across 23 versions & 1 rubygems

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