What is the suggested way to mix preloadQuery and subscriptions? I’m using react-router and start fetching as soon as I navigate to the page. Also I want to subscribe to latest updates
As I can see there is subscribeToMore for regular useQuery hook but there is none in query ref handlers, only fetchMore. Am I supposed to use useSubscription?
Hi @misha-erm to my knowledge we don’t have a “preloadSubscription” feature. Since subscriptions and queries both share the normalized cache, though, you could consider using preloadQuery to populate your cache with data that you know you’ll be subscribing to.
Ah okay, sorry for the confusion. I understand what you’re saying now bear with me, it’s a busy week so I’m not sure when I can get back to you with a recommendation but hopefully soon!
Hey @JeffAuriemma , love the package and the work of the team! Just wanted to bump and keep tabs on this.
I’m currently refactoring some waterfall like components that are using useSuspenseQuery and this request would solve the issue without a doubt. We already have heaps of reducers for certain data that run through subscribeToMore and it would be awesome to be able to use those without recreating them for individual components.
Hey @jerelmiller , what a legend! I saw a PR from you for something similar before and was hoping you’d swoop in on this one. Greatly appreciate it, it will be super useful with some optimisation changes we are making in our app!