T
TanStack13mo ago
fascinating-indigo

Best practice for single endpoint batching

Hi, Around caching sinuglar resources requested and retrieved from a batch endpoint. I can find some discussion of this online https://github.com/TanStack/query/discussions/365. However it is quite dated and was wondering if there has been any developments or any new ideas floating about?
4 Replies
like-gold
like-gold13mo ago
The solution in this discussion is still great
fascinating-indigo
fascinating-indigoOP13mo ago
Thanks for validating it Usually I would avoid adding a dependency for such a singular use case. I’m assuming you think it’s worth it?
like-gold
like-gold13mo ago
I'm not using batching so 🤷‍♂️
fascinating-indigo
fascinating-indigoOP13mo ago
haha fair, it's probably fine. GraphQL isn't going anywhere and dataloader's primary purpose is managing batching. The alternative of making my own custom jank react query hook seems much worse lmao thanks for the help

Did you find this page helpful?