Skip to content

Spring for GraphQL 1.1

Rossen Stoyanchev edited this page Nov 16, 2022 · 5 revisions

What’s New in Spring for GraphQL 1.1

JDK 17+ and Jakarta EE 9+ Baseline

  • The framework codebase is on Java 17 source code level.

  • Migrated from javax to jakarta namespace for Servlet 5+, HTTP and WebSocket handlers, Validation 3.0, and JPA 3.0; see also Spring Boot 3.0 release notes

  • GraphQL Java 19

  • Spring Data 2022.0.0, for using QueryDSL or Query by Example

  • Supported by starter in Spring Boot 3.0+

New Features

Several improvements for cases with input binding via @Argument method parameters, see #516, #447, #449, and #394.

Support for an ArgumentValue wrapper around an @Argument, or around a nested field of an @Argument annotated method parameter, as a means of checking whether an input value was provided but set to null or omitted from the input altogether;

Spring for GraphQL now uses the Micrometer context propagation library to propagate contextual information from the transport layer to controllers in the data fetching layer. This includes propagation of ThreadLocal values with a Spring MVC transport, and Reactor context with a WebFlux transport.

@BatchMapping exposes a maxBatchSize that’s set on the DataLoaderOptions for the underlying DataLoader.

Support for configuring global DataLoaderOptions as a starting point for all batch loader registrations via DefaultBatchLoaderRegistry constructor argument.

Upgrade and Migration Notes

  • The ThreadLocalAccessor contract from 1.0 is no longer supported. The Micrometer context-propagation library provides an equivalent contract that needs to be implemented instead, see #459.

Clone this wiki locally