Support batching in underlying services to avoid N+1 problem
obukhov opened this issue · 3 comments
obukhov commented
In case if implementing service resolves the fields of the type other service returns as a list (i.e. service A returns a list of ordered products and service B implements product fields resolution). This may lead to a high amount of requests per second to service B. To optimize that it would be nice to have an option to implement batching (in the service B) so all the requests caused by the same incoming query can be resolved as one batch query.
AlecAivazis commented
AlecAivazis commented
fwiw, this is documented here: https://gateway.nautilus.dev/advanced/batching
AlecAivazis commented
I'm going to close this issue, please let me know if there's anything else we can add to improve this support