Fork me on GitHub
#other-languages
<
2019-11-25
>
dangercoder14:11:04

I have a question regarding Java and Graphql, do you recommend any library? ping @gklijs 😉

gklijs14:11:45

The spring boot one has some flaws, and you need to provide the schema in the 'javascript' way. I generated it from the lacinia implementation with some tool, but would not like it myself. Graphql-java is very verbose I heard, haven't tried it myself, and possibly with some lambda tricks you can generalize those. Want to give the kotlin one a go, since it's kind of created in collaboration with Apollo. And the kotlin one generates the schema based on annotations.

gklijs14:11:02

https://github.com/openweb-nl/kafka-graphql-examples/blob/ge-java/GraphQL-endpoint GraphQL springboot starter example. If it's an application already using spring boot, and it has to be Java it's fine. Apart from the schema you need little code.

dangercoder14:11:26

Thank you for the insight, very valuable! Yeah. I have to use Spring Boot and Java, no freedom when it comes to tech-stack 😕.

gklijs14:11:29

You probably won't use subscriptions, but if you do be wary that it doesn't support queries over web socket, witch the re-graph Clojure GraphQL client defaults to.

gklijs14:11:37

Will create a kotlin version there in a few days, and maybe a ktor (kotlin framework build for async using coroutines) if I have time for it. Also be running stress tests on the subscriptions.

1