Skip to content

[4.0] Only set the partial flag if returnPartialData is set on query options. #12332

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

Closed
jerelmiller opened this issue Jan 31, 2025 · 3 comments
Closed

Comments

@jerelmiller
Copy link
Member

Currently the partial flag is set on the emitted result if the emitted result is not complete (according to the return value of cache.diff). In the default behavior or cases where users set returnPartialData explicitly to false, this behavior makes no sense. Instead, this flag should only be used when returnPartialData is set on options.

As part of this work, we should also consider renaming this flag to complete to avoid ambiguity on what data: undefined means. If the cache has no data for a given query, is it considered partial? Or is a query only considered partial when at least one field can be fulfilled from the cache, but not all of them. Moving to complete helps avoid this ambiguity.

@jerelmiller
Copy link
Member Author

The behavior was modified to always emit partial, but deprecate its usage. complete was not added but will be replaced with a solution from #12344. This is otherwise completed in #12333

Copy link
Contributor

github-actions bot commented Feb 5, 2025

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

Copy link
Contributor

github-actions bot commented Mar 8, 2025

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using our Community Forum or Stack Overflow.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant