Skip to content

No cache outcome in operation context #3439

Answered by kitten
RaikoM asked this question in Q&A
Discussion options

You must be logged in to vote

tl;dr:

  • If you're trying to keep data fresh while using Graphcache, requestPolicyExchange, or a custom approach, that sets cache-and-network to update data when it's getting “old” works
  • If you're refetching data explicitly (via a reexecute binding mechanism) or are using partial results in Graphcache (via schema awareness or @_optional) then in the former fetching: true will be set, and in the latter stale: true will be set

In short stale: true tells you whether a fresh background request for new data is ongoing.

It's a common mistake to assume that we care about whether a single result or field is “cached”. But in practice, this doesn't match UI/user expectations.

For a longer explanati…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@RaikoM
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants