-
Notifications
You must be signed in to change notification settings - Fork 60
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
Disable Fragment Field Merging #431
Merged
AnthonyMDev
merged 36 commits into
main
from
Field_Merging_7_x_fix_fragment_reference_fields
Aug 14, 2024
Merged
Disable Fragment Field Merging #431
AnthonyMDev
merged 36 commits into
main
from
Field_Merging_7_x_fix_fragment_reference_fields
Aug 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tringly typed Codable usage for JSON encoding
…tringly typed Codable usage for JSON encoding
✅ Deploy Preview for eclectic-pie-88a2ba canceled.
|
✅ Deploy Preview for apollo-ios-docc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This was referenced Jul 16, 2024
Merged
This was referenced Jul 16, 2024
…_fragment_reference_fields # Conflicts: # apollo-ios-codegen/Sources/GraphQLCompiler/ApolloCodegenFrontendBundle.swift
…_fragment_reference_fields
…_fragment_reference_fields # Conflicts: # apollo-ios-codegen/Sources/GraphQLCompiler/ApolloCodegenFrontendBundle.swift
… inclusion conditions
calvincestari
approved these changes
Aug 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good, let's get this merged!
AnthonyMDev
deleted the
Field_Merging_7_x_fix_fragment_reference_fields
branch
August 14, 2024 18:27
BobaFetters
pushed a commit
that referenced
this pull request
Aug 14, 2024
BobaFetters
pushed a commit
to apollographql/apollo-ios-codegen
that referenced
this pull request
Aug 14, 2024
BobaFetters
pushed a commit
that referenced
this pull request
Aug 14, 2024
199d6157 Disable Fragment Field Merging (#431) git-subtree-dir: apollo-ios-codegen git-subtree-split: 199d615764613523ed93f87f1f86c2c2675531fd
BobaFetters
pushed a commit
that referenced
this pull request
Aug 14, 2024
git-subtree-dir: apollo-ios-codegen git-subtree-mainline: cbe61c9 git-subtree-split: 199d615764613523ed93f87f1f86c2c2675531fd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a working implementation of the feature to allow disabling of field merging in generated models. Previous PRs were corrupted during rebasing and will be closed. This unified PR contains the entire feature.
Field merging configuration is implemented as an experimental feature currently. This needs ample testing in production before being considered stable.
Functionality
selectionSetInitializers
andfieldMerging
are not used together.Testing:
This PR is fully unit tested.
Manual testing can be done on the
AnimalKingdomAPI
,GitHubAPI
, andStarWarsAPI
by changing the config values in theSwiftScripts/Codegen
and then runningswift run Codegen
. All packages compile correctly with any combination of field merging values.Future Work
Possible future iterations include:
selectionSetInitializers
. I currently believe these to be fundamentally incompatible. If a means of making these features compatible can be identified, we should implement it.