Spring for GraphQL 1.3 RC1 Released

Releases | Rossen Stoyanchev | April 16, 2024 | ...

On behalf of the Spring for GraphQL team, I am pleased to announce the availability of 1.3 RC1. This post describes the release. For more on other upcoming features in 1.3, see the 1.3 M1 blog post.

GraphQL Java 22

The 1.3 release candidate builds on GraphQL Java 22, released earlier today. GraphQL Java 22 includes a lot of new features including major performance improvements, experimental support for the up and coming Defer and Stream Directives addition to the GraphQL spec, and much more.

The release includes breaking changes too, and this is a good time to experiment in your environment. See the GraphQL Java 22 release page for more details.

Schema Inspection

The schema inspection report on startup has proven to be a popular feature. However, as it depends on controller method signatures to be able to match schema to Java type, it did not fully inspect schema interface and union types because in such cases the controller method return type does not provide enough information about actual types at runtime.

The 1.3 release candidate adds support for inspecting interfaces and unions, which depending on the exact naming convention, can transparently discover Java types that correspond to interface implementing and union member types. If necessary, there are options to customize this to help the inspection.

Schema inspection has also been enhanced to detect and report mismatches between @Argument controller method parameters and field arguments declared in the schema.

Schema Interface Mapping

If you use schema interfaces, you would have run into the need to repeat mappings for the same field once for every implementing object.

The 1.3 release candidate adds support for mapping to schema interface fields by making those repeated registrations transparently unless they already exist. This works for both @SchemaMapping and for @BatchMapping methods.

Batch Loading with @EntityMapping

1.3 M1 added federation support to load federated entities through @EntityMapping annotated, controller methods. Thanks to early feedback, we've enhanced this with a batch mode where an @EntityMapping method can return all entities for a given type. See the updated Federation section in the documentation.

WebSocket Keep-Alive

WebSocket transports now support sending keep-alive PING messages at regular intervals if no other messages have been sent. On the server side, this is enabled through the Spring Boot property spring.graphql.websocket.keep-alive. On the client side, this is enabled through the client builder.

Jackson Codec for GraphQL vs Other Endpoints

It is now possible to configure a Jackson codec for a GraphQL endpoint separate from the one used for HTTP and web endpoints. This can be important to render GraphQL responses as needed (e.g. with null values) without causing side effects for regular HTTP endpoints.

For the list of all changes, see the v1.3.0-RC1 release page.

Netflix DGS

We continue to work closely with the DGS team on an integration that enables a common foundation for both frameworks to run on. The DGS team has now made the integration available for general use, and outlined a roadmap.

Please, see the announcement blog post and Josh's Bootiful Podcast with Paul Bakker and Kavitha Srinivasan is also worth watching.

Conclusion

Next up is the GA release on May 21. As always, your feedback is vital and much appreciated! Please, give the release a try and let us know how it works.

A week after the GA release is the 2024 edition of the Spring I/O conference on May 30-31 where we have a dedicated session for GraphQL Java 22 and Spring for GraphQL 1.3. I look forward to seeing those who are planning to attend. There are only a few tickets left!

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

Tanzu 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