I have an app with couple of screens. First screen shows data related to a collection and its document. Second screen show what is inside that document and shows it's all list of documents. And so on. It can be 7-8 level deep like this or more. But total amount of database size will never be greater than 500kB.
When the internet goes on and off and I'm in a screen, whose documents have never been read before, Users will see nothing as firebase caches data only after it has been queried once.
So, I want to download all the necessary data when the app starts or just the data for the first screen and lazy load all the data in the background immediately after that.
So, main question is, how can I get all data of a child at once as all firestore queries are shallow? and if a lazy load just after the first screen is shown, what is the better approach?
I've already seen this SO question, it doesn't help and it is old. And firestore as updated a lot in the meantime.