I am learning GraphQL
so I built a little project. Let\'s say I have 2 models, User
and Comment
.
const Comment = Model.defi
The concept you are refering to is called batching. There are several libraries out there that offer this. For example:
Dataloader: generic utility maintained by Facebook that provides "a consistent API over various backends and reduce requests to those backends via batching and caching"
join-monster: "A GraphQL-to-SQL query execution layer for batch data fetching."