Limit number of concurrent queries?
I have a handful of components that all handle their own internal state and all hadnle their own instance of useQuery. However, there can be LOTS of these queries, and I'd rather not flood my api with 20 concurrnet requests and instead hae it limit the loads to 5 or so at a time, allow those to finish before calling the next 5. Anyone have any idea how to accomplish this?
2 Replies
foreign-sapphire•3y ago
You'd need some throttling / queuing on your actual API layer.
graceful-beigeOP•3y ago
Dang so that means it's not possible in react query? That's disappointing, feels like an oversight, I'd imagine it wouldn't be hard for it to do to create a relatively simple request pool. But I suppose it's probably something I can handle independently then.