class GraphQL::Types::Float

Public Class Methods

coerce_input(value, _ctx) click to toggle source
# File lib/graphql/types/float.rb, line 7
def self.coerce_input(value, _ctx)
  value.is_a?(Numeric) ? value.to_f : nil
end
coerce_result(value, _ctx) click to toggle source
# File lib/graphql/types/float.rb, line 11
def self.coerce_result(value, _ctx)
  value.to_f
end