Check this out! Iām implementing batching query executor on top of lacinia to solve N+1 problem that works by analyzing selections-tree
This is for open source project, so it's possible I'll release it as a separate library
2 weeks of thinking, 2 days of typing, 200 lines of code %)
Color me interested. Could this be implemented using GraphQL directives rather than wrapping the entire tree?
I don't know what is GraphQL directives š
Do directives in lacinia affect selections-tree output?
Directives are annotations that can be placed on various schema and query document elements, for example, @deprecated. In the schema, you can associate code that can "wrap" a resolver function with your own function.