This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix always loading issue caused by error handling (#3107)
* Fix always loading issue caused by error handling The React Apollo `Query` component relies on Apollo Client's `ObservableQuery->getCurrentResult` method to get the results of a query to display. When `ObservableQuery` encounters an error, it stores that error in its associated query store, so that it can be passed back to React Apollo for handling. Unfortunately, the error stored in the query store isn't cleared out until a component unmounts, which means components that handle an error response followed by a valid response, won't get the chance to render the valid response. They're stuck rendering the error state, since the error stored in the `ObservableQuery` query store is never removed. This commit calls into a new `ObservableQuery.resetQueryStoreErrors` method, to clear out previously used errors, before moving on to handle subsequent responses. This means a component can handle an error, then receive and display a valid subsequent response. Fixes: #3090 * Changelog update * Update deps to use new `apollo-client` 2.6.3
- Loading branch information
Showing
4 changed files
with
24 additions
and
17 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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