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

Preserve networkStatus for incomplete cache-and-network queries. #4765

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented Apr 30, 2019

Blindly setting networkStatus to NetworkStatus.loading after the client part of a cache-and-network query was destroying useful information about the status of the request. Instead, we should set networkStatus to NetworkStatus.ready only when the request is complete, and leave networkStatus untouched otherwise.

Should fix #3660, #4693, and apollographql/react-apollo#1217.

Blindly setting networkStatus to NetworkStatus.loading after the client
part of a cache-and-network query was destroying useful information about
the status of the request. Instead, we should use NetworkStatus.ready only
when the request is complete, and leave networkStatus untouched otherwise.

Fixes #3660, #4693, and apollographql/react-apollo#1217.
@benjamn benjamn added this to the Release 2.6.0 milestone Apr 30, 2019
@benjamn benjamn requested a review from hwillson April 30, 2019 17:39
@benjamn benjamn self-assigned this Apr 30, 2019
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

Sounds and looks great @benjamn - thanks!

@benjamn benjamn merged commit 9e618f2 into release-2.6.0 Apr 30, 2019
@benjamn benjamn deleted the preserve-networkStatus-for-incomplete-cache-and-network-queries branch April 30, 2019 17:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants