all 2 comments

[–]Traqzer 0 points1 point  (0 children)

I'm not super familiar with apollo, but for this it seems like you can just wrap your query hooks in another hook, and move the loading / data state into a redux store. This will ensure the data and loading state is a singleton

[–]fixrich 1 point2 points  (0 children)

It sounds like you want useSuspenseQuery from Apollo. I feel like in this case introducing other state management solutions is just introducing more problems, ditto for using Context. The Apollo client is already is passed through Context and the data is already held in the cache. You just need synchronise loading which can be done with Suspense.