Sha256: a290705f54af8957806c75af41dd7bd2d8da8faf7bb45ab6c183398b52daf510
Contents?: true
Size: 471 Bytes
Versions: 20
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module GraphQL module Types class Float < GraphQL::Schema::Scalar description "Represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point)." def self.coerce_input(value, _ctx) value.is_a?(Numeric) ? value.to_f : nil end def self.coerce_result(value, _ctx) value.to_f end default_scalar true end end end
Version data entries
20 entries across 20 versions & 1 rubygems