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

Disable field merging for deferred fragment fields #3142

Closed
Tracked by #3093
calvincestari opened this issue Jul 24, 2023 · 2 comments
Closed
Tracked by #3093

Disable field merging for deferred fragment fields #3142

calvincestari opened this issue Jul 24, 2023 · 2 comments
Assignees

Comments

@calvincestari
Copy link
Member

calvincestari commented Jul 24, 2023

This work is linked to #3141 but can be done independently and ultimately is required for that solution to work correctly. I recommend pairing with @AnthonyMDev and working towards solving for #2560 as well as much as possible.

  1. Optional fragments (disabling field merging) - optional types are only needed when fragment fields are merged into entity selection sets. If field merging were disabled automatically for deferred fragments then the solution is simplified and we only need to alter the deferred fragments to be optional. Consuming the result data is intuitive too where a nil fragment value would indicate that the fragment data has not yet been received (i.e.: deferred) and when the complete response is received the fragment value is populated and the result sent to the client. This seems a more elegant and ergonomic way to indicate the status of deferred data but complicates the understanding of field merging.
@calvincestari
Copy link
Member Author

I believe this is already done and available in the preview.1 release; there are no merged fields from deferred fragments.

Copy link

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

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

No branches or pull requests

2 participants