Description
Describe the bug
The fetchPolicy
'no-cache'
is supposed to disable the default behavior for GraphQL queries to take the cached response of the query and thus save on network requests. I always wanted this behavior but never got it working in my app. Now I have set up a fresh project just for demo and it is not working here either.
To Reproduce
Steps to reproduce the behavior:
Try to send the same graphql query two or more times and notice it will only send one network request.
I have setup a demo project for this: https://github.com/mg98/apollo-cache-not-working
I created it with the Vue CLI and vue add apollo
with pre setup configuration. Follow the readme to start the app. There will be a text explaining you how to test the behavior.
Expected behavior
Always send a network request, because I globally set fetchPolicy
to 'no-cache'
.
Versions
vue: 2.6.11
vue-apollo: 3.0.0.beta.11, I can also verify for 3.0.3