Closed
Description
While working on reinstating the Spring for GraphQL auto-configuration in Spring Boot 3, I noticed a binary incompatibility when running tests:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class graphql.parser.antlr.GraphqlLexer
at graphql.parser.Parser.parseImpl(Parser.java:187)
at graphql.parser.Parser.parseDocumentImpl(Parser.java:156)
at graphql.parser.Parser.parseDocument(Parser.java:147)
at graphql.schema.idl.SchemaParser.parseImpl(SchemaParser.java:122)
This happens because in Spring Boot 3, the Hibernate 6 dependency enforces an antlr4-run 4.10 version, while graphql-java relies on 4.9.x. See this dependency insight report. The antlr4 4.9 -> 4.10 upgrade is breaking backwards compatibility and all grammars need to be regenerated, this is described in the official release notes.
The GraphQL Java team already received this feedback and decided to shade the antlr dependency to avoid future issues.
This means that Spring for GraphQL 1.1.0 will require GraphQL Java 19 as a minimum requirement.