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

fix: DataDict initialization of deferredFragments #557

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

calvincestari
Copy link
Member

@calvincestari calvincestari commented Dec 16, 2024

While working on selection set initializers I realized that the current generated initializers do not set the selection set types in the deferredFragments property.

Some of the named fragment initializers do not look correct but I believe this is due to apollographql/apollo-ios#3486 and apollographql/apollo-ios#3487. Adding the values to deferredFragment will not have any detrimental effect and those will get fixed on top of this work.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Dec 16, 2024

✅ Docs Preview Ready

No new or changed pages found.

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for eclectic-pie-88a2ba ready!

Name Link
🔨 Latest commit 78d8d16
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/6760773978fb6c000819f96e
😎 Deploy Preview https://deploy-preview-557--eclectic-pie-88a2ba.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit 78d8d16
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/6760773974daf20008ebe9ae

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.

LGTM. Great fix!


var deferredFragments: OrderedSet<String> = []

let nameGenerator: (_ typeInfo: SelectionSet.TypeInfo) -> String = { typeInfo in
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this pattern. Very clean!

@calvincestari calvincestari merged commit 504e47b into main Dec 16, 2024
35 checks passed
@calvincestari calvincestari deleted the fix/data-dict-initializer-deferred-fragments branch December 16, 2024 22:04
BobaFetters pushed a commit to apollographql/apollo-ios-codegen that referenced this pull request Dec 16, 2024
BobaFetters pushed a commit that referenced this pull request Dec 16, 2024
6db35551 fix: `DataDict` initialization of `deferredFragments` (#557)

git-subtree-dir: apollo-ios-codegen
git-subtree-split: 6db35551c7bc0879b61539c08338253a7b4a146b
BobaFetters pushed a commit that referenced this pull request Dec 16, 2024
…of `deferredFragments`

git-subtree-dir: apollo-ios-codegen
git-subtree-mainline: 9c595a8
git-subtree-split: 6db35551c7bc0879b61539c08338253a7b4a146b
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.

3 participants