question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apollo Client on server side (nodejs) cache policies don't work

See original GitHub issue

Hi guys, I’m using Apollo Client on a nodejs server and it works great, however when it comes to cache it does not work as expected, it always caches the requests even though I’m using no-cache or network-only, any ideas?

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vany0114commented, Jul 22, 2021

Sorry for the delay guys, I was working on the runnable reproduction project and I realized that actually, the client is working as expected, the issue was on my apollo server implementation. Sorry for the inconvenience.

1reaction
hwillsoncommented, Jul 18, 2021

Thanks @vany0114 - any chance you can provide a small runnable reproduction?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side caching - Apollo GraphQL Docs
Our philosophy behind Apollo Server caching is that a response should only be considered cacheable if every part of that response opts in...
Read more >
Server-side rendering - Apollo GraphQL Docs
Apollo Client provides a handy API for using it with server-side rendering, including a function that executes all of the GraphQL queries that...
Read more >
Configuring the Apollo Client cache - Apollo GraphQL Docs
This article describes cache setup and configuration. To learn how to interact with cached data, see Reading and writing data to the cache....
Read more >
Caching in Apollo Client - Apollo GraphQL Docs
Apollo Client stores the results of your GraphQL queries in a local, normalized, in-memory cache. This enables Apollo Client to respond almost immediately ......
Read more >
Advanced topics on caching in Apollo Client
This article describes special cases and considerations when using the Apollo Client cache. Bypassing the cache. Sometimes you shouldn't use the cache for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found