-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset query store errors via
ObservableQuery.resetQueryStoreErrors
(#…
…4941) * Reset query store errors via `ObservableQuery.resetQueryStoreErrors` React Apollo relies on the `ObervableQuery->getCurrentResult` method to retrieve query results to show within its components. When an error occurs while fetching results, that error is stored in the query store that each `ObservableQuery` instance is configured to use. Unfortunately, `getCurrentResult` will only retrieve subsequent results if no error exists in the query store. `ObservableQuery` doesn't currently provide a way to clear out query store errors, which means when React Apollo originating requests that cause an error occur, the error is stored, and future valid requests can no longer be processed. This commit adds a `resetQueryStoreErrors` method to the `ObservableQuery` public API, that will allow React Apollo (and other consumers) to be able to clear out query store errors. Related to: apollographql/react-apollo#3090 * Changelog update * Remove unnecessary expect
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 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
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