T
TanStack16mo ago
wise-white

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
conscious-sapphire
conscious-sapphire16mo ago
The solution in this discussion is still great
wise-white
wise-whiteOP16mo 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?
conscious-sapphire
conscious-sapphire16mo ago
I'm not using batching so 🤷‍♂️
wise-white
wise-whiteOP16mo 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?