-
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
Prevent merging of fragment fields into selection tree if fragment field merging is disabled #571
Conversation
✅ Docs Preview ReadyConfiguration{
"repoOverrides": {
"apollographql/apollo-ios-dev@main": {
"remote": {
"owner": "apollographql",
"repo": "apollo-ios-dev",
"branch": "fragment-field-merging-disabled-performance"
}
}
}
}
2 pages published. Build will be available for 30 days. |
✅ Deploy Preview for eclectic-pie-88a2ba ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for apollo-ios-docc canceled.
|
Although this does allow codegen to complete for me, I'm not sure if this is a good idea: |
I'm not sure that issue is related to this feature. It could be, but I'd like to get more information from you in that thread @pm-dev. |
…eld merging is disabled (#571)
…eld merging is disabled (apollographql/apollo-ios-dev#571)
4bc820e4 Prevent merging of fragment fields into selection tree if fragment field merging is disabled (#571) git-subtree-dir: apollo-ios-codegen git-subtree-split: 4bc820e4c3b1fa53992328d84b6c2b684e28ba2b
…lds into selection tree if fragment field merging is disabled git-subtree-dir: apollo-ios-codegen git-subtree-mainline: b5a5e92 git-subtree-split: 4bc820e4c3b1fa53992328d84b6c2b684e28ba2b
Currently, when fragment field merging is disabled we are preventing the fields from being merged into the
MergedSelections
while traversing the builtEntitySelectionTree
. However, the performance issues described in apollographql/apollo-ios#3434 are actually caused during the merging of the fragment fields into theEntitySelectionTree
s during the building of the operations.This PR prevents the fragment selection trees from being merged into the
EntitySelectionTree
while building the operations if fragment field merging is disabled.This means that the entity trees are actually incomplete, but they still work for the purposes of Codegen in this scenario. Incomplete
EntitySelectionTree
s would cause selection set initializers to be invalid. But this is not a problem because disabling fragment field merging is already incompatible with selection set initializers (and we have a validation step to ensure those options are not used together).