Class: ElasticGraph::GraphQL::ScalarCoercionAdapters::JsonSafeLong
- Inherits:
-
Object
- Object
- ElasticGraph::GraphQL::ScalarCoercionAdapters::JsonSafeLong
- Defined in:
- lib/elastic_graph/graphql/scalar_coercion_adapters/longs.rb
Class Method Summary collapse
Class Method Details
.coerce_input(value, ctx) ⇒ Object
23 24 25 |
# File 'lib/elastic_graph/graphql/scalar_coercion_adapters/longs.rb', line 23 def self.coerce_input(value, ctx) Longs.to_ruby_int_in_range(value, JSON_SAFE_LONG_MIN, JSON_SAFE_LONG_MAX) end |
.coerce_result(value, ctx) ⇒ Object
27 28 29 |
# File 'lib/elastic_graph/graphql/scalar_coercion_adapters/longs.rb', line 27 def self.coerce_result(value, ctx) Longs.to_ruby_int_in_range(value, JSON_SAFE_LONG_MIN, JSON_SAFE_LONG_MAX) end |