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

Generate nil default value for input field w/default value in schema #358

Merged
merged 1 commit into from
May 14, 2024

Conversation

AnthonyMDev
Copy link
Contributor

Fixes #2997.

The Kotlin codegen generates the parameter for that field with a default value of nil, so that if the user doesn’t pass a value, the field is omitted from the request and the schema side default value is used. This provides parity with Kotlin client functionality.

Copy link

netlify bot commented May 14, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit 477fa48
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/66439baa81083a00080402da

Copy link

netlify bot commented May 14, 2024

Deploy Preview for eclectic-pie-88a2ba canceled.

Name Link
🔨 Latest commit 477fa48
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/66439baaae6c820008d43d0a

@AnthonyMDev AnthonyMDev enabled auto-merge (squash) May 14, 2024 17:16
Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Thank you so much for doing this. ❤️

@AnthonyMDev AnthonyMDev merged commit 021d620 into main May 14, 2024
25 checks passed
@AnthonyMDev AnthonyMDev deleted the fix-2997 branch May 14, 2024 17:35
BobaFetters pushed a commit to apollographql/apollo-ios-codegen that referenced this pull request May 14, 2024
BobaFetters pushed a commit that referenced this pull request May 14, 2024
a491080f Generate nil default value for input field w/default value in schema (#358)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: a491080fa0d51f680fbbeaaa8bd631c1f764099f
BobaFetters pushed a commit that referenced this pull request May 14, 2024
…input field w/default value in schema

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: ec3a037
git-subtree-split: a491080fa0d51f680fbbeaaa8bd631c1f764099f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants