Spring GraphQL Milestone One

submited by
Style Pass
2021-07-19 19:00:06

A new library aims to unify all the previous approaches of accessing GraphQL from Spring. The Spring GraphQL project, which has reached its initial milestone towards a 1.0 release, integrates GraphQL, Java and Spring and was developed as a collaboration between both teams.

Until now the way you accessed GraphQL from Spring was through the standard GraphQL Java Spring project which at the minimum would expose a /graphql endpoint (something that as well as the transport agnostic, was missing from the original GraphQL Java library) in order to accept the GraphQL payloads over HTTP; or the newest counterpart, that of the Netflix DGS Framework (Domain Graph Service).

However adding Spring support to GraphQL Java was an afterthought and not first class citizenship. Thus as of this July, there's another option that aims to completely replace the venerable GraphQL Java Spring library (which is itself based on GraphQL Java) and integrate Spring from the beginning.

Since GraphQL provides a schema language, it once more brings up the Schema First vs Code First debate.The team behind Spring GraphQL is certainly not shy admitting that they're pro-schema. It's a notion that I also share generally, but especially when doing Hibernate-related work, as I describe in The Insider's Guide to the Java Web Developer Nanodegree:

Leave a Comment