Why does my query operation get upgraded to "cache-first", despite explicitly setting it to "cache-only"? #1480
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey, The mutation causes the default More about this here If you really want to stay on the client and do something locally with the response of your More about this here |
Beta Was this translation helpful? Give feedback.
Hey,
The mutation causes the default
document-based
cache to invalidate the entity, this isn't on a query-level, it will just refetch the query if it's being watched as this mutation could have invalidated this entity.It sees your mutation returning something of
__typename
Feedback
and it sees thatgetFeedback
observers entities with__typename
Feedback
this means that this naive cache has no other option then to refetch this entity as it could be stale.More about this here
If you really want to stay on the client and do something locally with the response of your
mutation
we'll find ourselves in a normalized caching world.More about this here