graphql

2021-11-11T12:13:36.010600Z

FYI; Lacinia still states beta status in the readme, while there's a 1.0 release for a while now 🙂

hlship 2021-11-11T17:48:55.016Z

Oops!

hlship 2021-11-11T18:07:04.016500Z

fixed

💪🏻 1
2021-11-11T12:34:07.011200Z

Hi! Does anyone know if there is a function or library that can convert from an graphql schema defined in edn to a SDL-schema? Or maybe extraxt an SDL-schema from a graphql rest endpoint somehow.

2021-11-11T12:34:40.011300Z

You can run an introspection query to get the schema. Most GraphQL explorers come with one. Here's an example: https://gist.github.com/craigbeck/b90915d49fda19d5b2b17ead14dcd6da

2021-11-11T12:36:11.011600Z

Thank you! I'll check it out :)

2021-11-11T12:36:48.011800Z

Introspection queries don't support directives though; so you may have to copy them over by hand. at least, unless someone knows about a edn->sdl library 😬

2021-11-11T12:41:00.012Z

Yeah I had to remove the directives part to get it to respond. The thing is I'm trying to generate a Java client to my graphql API, with this maven project. https://github.com/graphql-java-generator/graphql-maven-plugin-project But it uses graphqls files.

2021-11-11T14:37:18.014200Z

I seem to be unable to extend unions: I'm trying to extend union MyUnion = ExtraType but it results in

{:type clojure.lang.ExceptionInfo,
 :message "Failed to parse GraphQL schema.",
 :data {:errors ({:locations [{:line 1, :column nil}],
        :message "no viable alternative at input 'extendunion'"})}
Is this not supported in lacinia 🤔 ?

2021-11-11T15:21:59.014600Z

Adding extend union-support was easy enough. I could create a PR if anyone is interested

hlship 2021-11-11T17:49:44.016200Z

Seems like an oversight to me, so a PR would be welcome.

👍🏻 1
2021-11-11T21:12:25.017300Z

https://github.com/walmartlabs/lacinia/pull/391 Here you go!

emccue 2021-11-11T15:47:07.015700Z

Has anyone tried sending transit as the wire format for gql?

gklijs 2021-11-11T19:13:12.016900Z

Should work, main problem is compatibility with other clients, which in turn probably kind of defeats the purpose.

Ryan 2021-11-11T16:56:00.015900Z

Oooh that sounds intriguing