thangchung / modular-starter-kit

The starter kit with entire modular approach to help remove boilerplate code in developing
MIT License
15 stars 9 forks source link

GraphQL: Batch requests #2

Open thangchung opened 6 years ago

thangchung commented 6 years ago

Why do we need the batch requests? Please come to read https://simonmar.github.io/bib/papers/haxl-icfp14.pdf

https://github.com/graphql-dotnet/graphql-dotnet/issues/3 https://github.com/dlukez/dataloader-dotnet https://github.com/dlukez/graphql-dotnet-dataloader https://github.com/facebook/Haxl/blob/master/example/sql/readme.md <= N + 1 problems https://ocharles.org.uk/blog/posts/2014-03-24-queries-in-loops-without-a-care-in-the-world.html

We can consider making this batch with Rx.NET at https://stackoverflow.com/questions/7947580/processing-a-batch-of-request-with-reactive-extension, not sure need to try.

thangchung commented 6 years ago

https://gist.github.com/yallie/0b9e48f2999a8f421997a71559341d71

thangchung commented 6 years ago

GraphQL has already had it, reference to

Discussion about it at https://github.com/graphql-dotnet/graphql-dotnet/issues/264

Another excellent reference is http://sangria-graphql.org/learn