Greetings, quick normalized caching question. I no...
# apollo-kotlin
f
Greetings, quick normalized caching question. I noticed that there is a refetchPolicy context with this kdoc:
Sets the FetchPolicy used when watching queries and a cache change has been published
I just want to see if I understand the behavior. So when the cached data changes, the ApolloStore is going to publish a list of the changed keys. When you watch a Query, and it sees the relevant keys have been changed, it has to make a decision about how to emit the updated data. The default (CacheOnly) will simply try to read the query from the cache. But if we changed it to (say) NetworkOnly, then it would make a network call every time relevant keys changed, and so on with the other Fetch Policies? And normally any errors would be eaten up but I can have them thrown instead by setting
refetchThrows=true
?
m
That's the idea 👍. I'd strongly encourage you to update to 4.0.0-beta as the error handling is much more consistent there
f
nice, yeah I think we'll be merging that update very soon