Skip to content

fix: Local cache mutation generation when field merging disabled #654

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

Merged
merged 8 commits into from
May 30, 2025

Conversation

calvincestari
Copy link
Member

Fixes apollographql/apollo-ios#3554

The full set of selection set initializers must always be generated for local cache mutation operations and fragments. Before this change using a fieldMerging policy of anything other than none would generate local cache mutations but they could not be initialized and did not contain all the correct merged fields.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented May 16, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: da0721188710ec689bb12df0

Copy link

netlify bot commented May 16, 2025

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit 53512be
🔍 Latest deploy log https://app.netlify.com/projects/apollo-ios-docc/deploys/6837a1a47e7ec70008f8543c

@calvincestari calvincestari requested a review from AnthonyMDev May 16, 2025 21:40
@calvincestari
Copy link
Member Author

@BobaFetters - take a look at this one too if you'd like. I'll wait for @AnthonyMDev to review too before merging.

Copy link
Contributor

@AnthonyMDev AnthonyMDev left a comment

Choose a reason for hiding this comment

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

Great work! Code looks good to me, just some suggestions for the tests.

We're going to be handling the propagating of mutable status to fragments in a separate PR right?

calvincestari and others added 4 commits May 28, 2025 15:55
Co-authored-by: Anthony Miller <[email protected]>
…m:apollographql/apollo-ios-dev into fix/fieldmerging-for-local-cache-mutation
@calvincestari
Copy link
Member Author

OK @AnthonyMDev - ready for another review.

@calvincestari calvincestari requested a review from AnthonyMDev May 28, 2025 23:53
@calvincestari
Copy link
Member Author

We're going to be handling the propagating of mutable status to fragments in a separate PR right?

Correct. I'm working on that one now. It'll be layered on top of this PR but this one can be merged before. I'd like to get them both merged before publishing the next release though.

@calvincestari calvincestari merged commit 1fce35f into main May 30, 2025
31 checks passed
@calvincestari calvincestari deleted the fix/fieldmerging-for-local-cache-mutation branch May 30, 2025 18:54
BobaFetters pushed a commit to apollographql/apollo-ios-codegen that referenced this pull request May 30, 2025
BobaFetters pushed a commit that referenced this pull request May 30, 2025
1b1661ba fix: Local cache mutation generation when field merging disabled (#654)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: 1b1661ba166f6cbb857c003d016e5891f4a6c554
BobaFetters pushed a commit that referenced this pull request May 30, 2025
…ation when field merging disabled

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: 9c9efcc
git-subtree-split: 1b1661ba166f6cbb857c003d016e5891f4a6c554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-all field merging causes selection set initializer to stop being generated for local cache mutations
3 participants