Apollo Angular SSR use state transfer: not respect default cache policy cache-first
, have to add manual on each request
#1765
Labels
cache-first
, have to add manual on each request
#1765
Describe the bug
As Apollo Client describe, it default policy is
cache-first
which is not really understand why not working on apollo angular universal if I use TransferState.To Reproduce
Steps to reproduce the behavior:
console.log(this.apollo.client.cache.readQuery(query))
can see the cache result still here.cache-first
to the query. Client apollo happy now and don't make request.Expected behavior
cache-first
on every request.I don't know is that by design or miss take. the Apollo Angular change it?
if it by design. we should note the developer. "You should add
fetchPolicy: 'cache-first'
if you want your query read the cache fromon the document.
Environment:
Additional context
I'm willing to check source code. I already look in source code and don't find that Apollo Angular change anything relevant to fetchPolicy. I still cannot find the reason. I can make a PR which have some test case if you like. or an other PR for document if you think we need notice developer should add
cache-first
if you want to cache.BTW, what is the default cache policy of Apollo Angular? did I miss something?
The text was updated successfully, but these errors were encountered: