Skip to main content

Spring for GraphQL 1.2.0 released

Releases | Brian Clozel | May 17, 2023 | ...

I'm pleased to announce that Spring for GraphQL 1.2.0 is now available on Maven Central. This version will ship with Spring Boot 3.1.0 later this week.

This is a new feature release for the Spring Boot 3.1.x generation. If you are still using Spring for GraphQL 1.0.x, please consider upgrading to Spring Boot 3.x as OSS support will end next November. We have also raised the baseline version for GraphQL Java to 20.x and we will align with the new GraphQL Java release policy from now on.

We have worked on the most popular issues from the community.

Pagination Support

This release provides first-class support for pagination, seamlessly adapting Spring Data pagination to the GraphQL Cursor Connection specification, including support for the latest and greatest Scroll API in Spring Data 2023.01. To learn more about the pagination support in Spring GraphQL 1.2, check out the project's reference documentation.

Schema Mapping Checks

If you are a GraphQL Java Kickstart user, you're probably missing the feature to check schema mappings on startup. We've taken inspiration and created a similar feature to detect schema fields without a corresponding DataFetcher or Java object property, and likewise to detect controller methods and DataFetcher registrations to non-existing fields.

You can enable this through the GraphQlSource.Builder, get access to a SchemaReport on startup, and decide how to handle it. To learn more this, check out the project's reference documentation.

Annotated Exception Handling

Starting in this release, you can handle exceptions from @SchemaMapping controller methods via @GraphQlExceptionHandler annotated handler methods. Those can be declared and apply locally within the same @Controller, or globally with @ControllerAdvice.

One benefit of this is the ability to also handle exceptions from @SubscriptionMapping methods, including exceptions raised later after the Publisher has started emitting data. To learn more, check out the project's reference documentation.


For a list of all enhancements, see the Versions wiki page.

In Conclusion

We expect to have our next minor release 1.3 in about 6 months, later this year, and look forward to continued feedback and evolution of our programming model and features set.

We are also at Spring I/O this week where we will present Observing Spring for GraphQL in Action. For those attending the conference, we look forward to seeing you and chatting.

Last but not least, check out the newly published book GraphQL with Java and Spring from our collaborators, Andi Marek and Donna Zhou.

How to get involved?

If you have general questions, please ask on using the spring-graphql tag.

Project Page | GitHub | Issues | Documentation | Stack Overflow

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all