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

FetchPolicy 'network-only' and 'no-cache' return cached value in Apollo Client v3 #6432

Closed
thojanssens opened this issue Jun 12, 2020 · 1 comment

Comments

@thojanssens
Copy link

thojanssens commented Jun 12, 2020

When I run multiple times a query with a fetchPolicy set to 'network-only' or 'no-cache', it will execute only 1 server request.

client.query({
  fetchPolicy: 'network-only',
  query: gql`
    query {
      me {
        id
      }
    }`
}) .then(result => console.log(result))

When I execute this 3 times, I will see only 1 call to the network in Chrome's Network Tab, my server logs only 1 time, but 3 logs in the client's console.

Any idea?

@thojanssens
Copy link
Author

I noticed I create a duplicate.
Here is an open issue:
#6313

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant