graphql-scalars icon indicating copy to clipboard operation
graphql-scalars copied to clipboard

Add spec for `Long` custom scalar type

Open jakobmerrild opened this issue 11 months ago • 1 comments
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.

jakobmerrild avatar Dec 16 '24 10:12 jakobmerrild