Quick question that I haven’t thought out yet but I’m wondering if you have: we’re using Apollo’s cache to keep single source of truth for majority of the data in the app. This works very well, but sometimes we have data that we’d
very much like to
always have available. We would fetch it when the user logs in and then the app could operate under assumption that observing the query will emit cached value
immediately.
This works until we update the query and start fetching a new field for example. Now, Apollo can’t emit any value, so it emits
null
and refetches the query. Have you ever thought about some way to do
migrations for the cached state of the queries, such that the app can continue working while offline? Such migrations could compute the default values or insert empty/null objects that the query will use for the time being, until it’s refetched