A mechansim is needed to specify "Int" types in the schema as Int32.
Opened this issue · 1 comments
Use case
The graphql documentation https://graphql.org/learn/schema/ defines Int as A signed 32‐bit integer.
. We recently ran into a problem where we sent a value that exceed the 32 bit maximum on our server which caused an error. Our server expects 32bit integers.
Describe the solution you'd like
An option added to ApolloCodegenConfiguration.OutputOptions
which specifies whether Int
should be explicitly Int32, Int64, or Int (variable based on platform).
Hi @scottasoutherland - thanks for creating the issue, I can sense the confusion this must have caused.
I've spoken with the rest of the team and we agree this should be a configuration option for the Swift generated code. The codegen configuration default for 1.0 should remain as it is now though (Int
) to avoid a breaking change for everyone. Though in the upcoming 2.0 release the codegen configuration default should change to be Int32
to better match the GraphQL spec as default.
Our next planning meeting isn't for a while so I haven't prioritized it yet but if you are interested in contributing we can certainly work together on the configuration option and implementation.