Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A mechansim is needed to specify "Int" types in the schema as Int32. #3433

Open
scottasoutherland opened this issue Aug 29, 2024 · 1 comment
Labels
codegen Issues related to or arising from code generation feature New addition or enhancement to existing solutions

Comments

@scottasoutherland
Copy link

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).

@scottasoutherland scottasoutherland added the feature New addition or enhancement to existing solutions label Aug 29, 2024
@calvincestari
Copy link
Member

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.

@calvincestari calvincestari added the codegen Issues related to or arising from code generation label Aug 29, 2024
@calvincestari calvincestari added this to the Minor Releases (1.x) milestone Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen Issues related to or arising from code generation feature New addition or enhancement to existing solutions
Projects
None yet
Development

No branches or pull requests

2 participants