Use relay pre-caching to warm up the root view controllers
Aim: We use background fetch to keep an up-to-date cache of the initial home and user creds.
How: On the fetch, we download a query then store the details to the FS, then we can use the new prefetching in Relay Modern to fill the cache before the JS runtime is up and running.
Tricky: There's no docs we can find so far
There's a lot of useful discussion in https://github.com/facebook/relay/issues/676#issuecomment-290476329 and this diagram of what it looks like.
This comment: https://github.com/facebook/relay/issues/676#issuecomment-325214249 shows that maybe we can execute the query through relay, persist the store and then reload with on launch?
The context of that thread is rehydration and the linked to comment also very much seems to be about serializing/deserializing a full Relay store, i.e. one that has data loaded on the server-side and then continues to use that on the client-side.
Ah shame, here's some more related tidbits: http://taiki-t.hatenablog.com/entry/2017/09/05/181931 and https://github.com/facebook/relay/pull/2121/files
Apollo are getting into this game too: https://dev-blog.apollodata.com/the-future-of-state-management-dd410864cae2