-
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.
Move cache-first fallback logic after first network request.
PR #6353 explains the rationale for switching to a cache-first FetchPolicy after an initial cache-and-network or network-only policy. When #6365 was implemented, options.fetchPolicy was examined only once, at the beginning of fetchQueryObservable, so the timing of changing options.fetchPolicy did not matter as much. However, fixing #6659 involves checking the current options.fetchPolicy whenever the QueryData class calls this.currentObservable.getCurrentResult(), so it's now more important to delay changing options.fetchPolicy until after the first network request has completed.
- Loading branch information
Showing
2 changed files
with
35 additions
and
30 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