We don't have server currently. We're using Apollo client purely on client side with apollo-link-state
and apollo-link-rest
. I want to prevent the loading state of the application as I can have the raw data I would get from the REST endpoint during site load. The closest I could get was using our customFetch
handler where IF response exists in cache THEN return new Response() with that data
. The problem is that this will trigger the loading state for a moment. I want to avoid this rerender in the application. I cannot use writeQuery()
as it would need all the custom types and transformations applied before and the dataset is pretty complex. What I want is to feed my cache at initialization with raw, unprocessed data.
Asked
Active
Viewed 243 times
3

wintercounter
- 7,500
- 6
- 32
- 46