Fork me on GitHub
#graphql
<
2020-02-16
>
oliy12:02:40

I am actually writing a library to help compose queries, specifically the n+1 problem https://github.com/oliyh/superlifter

👍 12
hlship17:02:32

It'll be interesting to compare; we have a Dataloader library that we're trying to get through the Walmart open-source pipeline.

hlship17:02:04

I think our approaches are simiilar. We'll see.

oliy12:02:10

It uses the composability + deduplication characteristics of urania

oliy12:02:52

There is an example folder with a Lacinia example of the n+1 solution using superlifter

oliy12:02:35

I'm halfway through refactoring how it works though so it's definitely not stable yet but it's nearly where I want it to be (see the pools branch if you're really interested)

oliy12:02:29

Essentially at resolve time you throw all your work into a bucket and the bucket of work is performed asynchronously, either after a certain amount of time has passed (dataloader style) or when the bucket reaches a certain size (useful for n+1 when you know n in advance)