Fork me on GitHub
#graphql
<
2018-12-13
>
jmayaalv10:12:10

what's the recommended way for clients to control the shape of the queries in lacinia ? looking at something like graphql-leveler https://www.fourkitchens.com/blog/development/graphql-leveler-controlling-shape-query/

orestis10:12:54

That sounds like a weird requirement, opening up a huge can of worms. I’m not aware of anything Lacinia-related for this. But looking at the code for this, it should be trivially implementable.

orestis10:12:17

It’s a total of 100 lines of Javascript 🙂

jmayaalv10:12:01

basically we will probably want to add a new level to the tree and want to avoid changing the libraries that parse the query results. Looking for the cleanest way to do it.

bmills15:12:02

Leveler sounds similar to something I did once to promote nested fields into their own object so I could get GatsbyJS to interpret them as their own nodes. It was just for a demo, but adding my own metadata into a standardized language didn't feel awesome.

4