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•13mo ago
The solution in this discussion is still great
fascinating-indigoOP•13mo 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•13mo ago
I'm not using batching so 🤷♂️
fascinating-indigoOP•13mo 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