graphql-scalars
graphql-scalars copied to clipboard
Add spec for `Long` custom scalar type
trafficstars
The Long data type is commonly used in many applications because the largest value that can be held in an Int value is 2^31-1. See: https://github.com/graphql/graphql-spec/issues/73
I'm honestly torn about whether or not output strings should be allowed 👀 . As discussed in the linked issue common clients (JavaScript) does not read JSON numbers above 2^53-1 into number without loss of precision.
Also accepting String inputs without accepting String outputs seem inconsistent.