graphql-rust / graphql-parser

A graphql query language and schema definition language parser and formatter for rust
Apache License 2.0
351 stars 74 forks source link

i64 is used for integers when i32 should be used #53

Open mathstuf opened 3 years ago

mathstuf commented 3 years ago

This code says that the spec doesn't have a size for numbers, but it does:

The Int scalar type represents a signed 32-bit numeric non-fractional value. Response formats that support a 32-bit integer or a number type should use that type to represent this scalar.

See: graphql-rust/graphql-client#266

tailhook commented 2 years ago

This is true for inputs and outputs. But I'm still not sure it is true for literals.

ittorchbearer commented 2 years ago

I made a feature for this so it's not breaking and thus doesn't need to wait for a major version. Someone could even add deprecation notice or on move to v1.0.0 just switch it to default to i32 and still offer the i64 as a feature to make the transition easier for people. #65