Fork me on GitHub
#graphql
<
2017-06-11
>
lilactown17:06:25

is there any thoughts or work being put into converting GraphQL schema language to a lacinia EDN schema definition?

boubalou12:06:39

Can you elaborate? Is that a rant or just some random thoughts on some feeling you had while implementing it?

boubalou13:06:00

I personally had no issues on my side doing this.

boubalou13:06:45

Ah, nevermind, I think I read it wrong.

hlship16:06:55

We have thought about allowing the schema to be parsed from the same language as present in the spec ... but we would still need a mechanism for documentation and other metadata, and for attaching resolvers and conformers (the later, for custom scalars). It's not a lot of work, but there just hasn't been need and bandwidth.

lilactown21:06:38

gotcha. I'm getting ready to sit down with business and architects to figure out a schema, and likely I'll try and document it using the GraphQL schema language. I'm now anticipating a lot of work just in translating that to EDN (and getting it correct), so I wasn't sure if there was already a solution

MegaMatt19:06:13

Is it possible to get the graphql schema from the edn? I'm working on a project that is in js and am trying to keep parity with clojure to eventually switch over so i make the edn file first then manually do the js afterwards.

hlship20:06:10

The same logic that is used by Introspection could generate the schema language output, but I haven't tried to write that code. I can see your use-case ... for example, I've advised teams to create a quick mock of a schema using the JavaScript RI to test the front-end against, while waiting for the full interface in Lacinia, so having a way to export to that format would be useful, but our time to work on non-essential improvements is quite constrained. I'd rather spend the time working out subscriptions.