I'm not sure if this is an Apollo question, or svelte-apollo question.. ApolloClient seems to automatically write query results to the cache, but this is only triggered when navigating to a new route. It's strange to me that the query result is not immediately cached.
I'm using a reactive if statement as a 'workaround':
I'm not sure if this is an
Apollo
question, orsvelte-apollo
question..ApolloClient
seems to automatically write query results to the cache, but this is only triggered when navigating to a new route. It's strange to me that the query result is not immediately cached.I'm using a reactive if statement as a 'workaround':
Am I misunderstanding something here, or would it actually make sense to add a
restore
statement to thesvelte-apollo
query()
function?