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

data is cached when fetchPolicy is no-cache and notifyOnNetworkStatusChange:true #7611

Closed
Godsenal opened this issue Jan 24, 2021 · 0 comments · Fixed by #7761
Closed

data is cached when fetchPolicy is no-cache and notifyOnNetworkStatusChange:true #7611

Godsenal opened this issue Jan 24, 2021 · 0 comments · Fixed by #7761
Assignees

Comments

@Godsenal
Copy link

Godsenal commented Jan 24, 2021

Intended outcome:

Data should not be cached when fetchPolicy is no-cache, regardless of notifyOnNetworkStatusChange option.

Actual outcome:

Data is cached when fetchPolicy is no-cache and notifyOnNetworkStatusChange:true.

First requested data is not cached as intended, but all requested data by setting variables or refetching is cached.

How to reproduce the issue:

Here is the reproduction link.

If you set variable 1 -> 2 and check console log, you can see data has been cached regardless of no-cache fetchpolicy.

Versions

System:
OS: macOS 11.1
Binaries:
Node: 12.19.0 - /usr/local/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Browsers:
Chrome: 87.0.4280.141
Safari: 14.0.2
npmPackages:
@apollo/client: ^3.2.4 => 3.2.4

It also happens in the latest version.

@jcreighton jcreighton self-assigned this Feb 25, 2021
benjamn added a commit that referenced this issue Mar 15, 2021
…cache-fetchpolicy"

This reverts commit 319993e, reversing
changes made to 6120401.

Because #7611 could be a visible change for some applications, we've
decided to relocate these changes onto the release-3.4 branch, rather than
main, so we revert the PR on main, merge main into release-3.4, then
un-revert the PR on the release-3.4 branch.
@brainkim brainkim assigned brainkim and unassigned brainkim Jun 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants