Skip to content

Commit

Permalink
Preserve no-cache fetchPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenn Creighton committed Feb 26, 2021
1 parent 370cbb6 commit 680b796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ export class QueryManager<TStore> {
// In order to force delivery of an incomplete cache result with
// loading:true, we tweak the fetchPolicy to include the cache, and
// pretend that returnPartialData was enabled.
if (fetchPolicy !== "cache-first") {
if (fetchPolicy !== "cache-first" && fetchPolicy !== "no-cache") {
fetchPolicy = "cache-and-network";
}
returnPartialData = true;
Expand Down

0 comments on commit 680b796

Please sign in to comment.