Hacker News new | ask | show | jobs
by jpgvm 2893 days ago
It's not impossible in Java but it does require a strong grasp of graphql-java's execution model and the DataFetchingEnvironment and associated classes. We accomplish something similar to what you desire when querying our time series database via GraphQL.

The big difference between Java and Javascript when it comes to GraphQL is the amount of noise, tutorials and examples on the Javascript side far outweigh other options right now.

Javascript may be the "happy" path for now but I do hope that we see continued investment in Java/Scala/Ruby/Python/.NET etc as those implementations have the opportunity to be better architected and more performant that the reference JS implementation. The reference implementation uses a very simplistic execution model which for now has been copied almost verbatim into other languages but there is great potential for a proper query planner and optimisation layer at the GraphQL layer.

Disclaimer: I work at MDG on Apollo Engine (the backend of which is Kotlin utilising graphql-java).

2 comments

Do you have a kotlin graphql library you'd recommend. I just started working on Kotlin with GraphQLJava. I saw graphql-kotlin, but that appears to have been updated like a year ago. I've been using graphql-spqr. Mixing kotlin and java in my projects, to get around the annotation bug.

I do agree on the noise and lack of tutorials. I'm getting ready to present on a GraphQL option. We don't want to use javascript. The tutorials for java are a bit cumbersome.

Btw I'm really liking apollo.

Agreed, there is a ton of potential for query planning an optimization.

These last months, I've been working non-stop in a blazing-fast GraphQL engine that beats the rest by an order of magnitude - https://graphql-quiver.com/