Fork me on GitHub

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


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


I personally had no issues on my side doing this.


Ah, nevermind, I think I read it wrong.


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.


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


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.


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.