-
I have a GraphQL object that stores file meta-data and includes a signed URL where the actual file data can be downloaded. This signed URL has an expiration so at some point the cache entry will become invalid even without a mutation being performed. Is it possible to invalidate these entries at the end of their validity period from inside the exchange? Or is this something I will need to set a timeout for on any pages making use of these objects? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hiya 👋 You could try to write a resolver that basically returns that object (or the given ID field for it). Then that resolver can return |
Beta Was this translation helpful? Give feedback.
Hiya 👋
I assume you mean in Graphcache, i.e. our normalised cache?
You could try to write a resolver that basically returns that object (or the given ID field for it). Then that resolver can return
undefined
which is basically a signal to tell the cache that the field is uncached/missing which will automatically force a new request to be made