dgs-framework
dgs-framework copied to clipboard
feature: support Spring Boot 3.0.0-M2
Expected behavior
Fully work in a Spring Boot 3.0.0-M2 project.
Actual behavior
GraphiQL autoconfiguration prevents Spring Boot from starting, DgsDataLoaders don't get picked up.
Steps to reproduce
- Create a plain Spring Boot 3.0.0 project (https://start.spring.io/#!type=gradle-project&language=kotlin&platformVersion=3.0.0-M2&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo)
- Add Netflix DGS Spring Boot Starter to dependencies:
implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:4.9.24")
- Start application and notice it failing to start with the following error:
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
... 34 common frames omitted
As described here, Spring has migrated all Java EE APIs from javax
to jakarta
, so usages would need to be adapted.
While Spring Boot 3.0.0's general availability is planned for November 2022, I think it still might be important on how this will be handled.
Thanks for bringing this up and trying it out. We are aware of the upcoming release, and will be planning to update the framework later this year to Spring Boot 3.0.0
.
Confirming that this issue is still present in 3.0.0 and 3.0.1. Have a project with a graphql autoconfig that fails to initiate on startup due to missing graphql.GraphQL condition. Reverting springboot version to a previously working version [2.5.5] fixes the issues, so I believe I'm experiencing the same thing
Steps to Reproduce
- Create new springboot 3.0.[0-1] project using spring initializer
- Add apollo graphql plugin (id("com.apollographql.apollo") version "2.5.11")
- Create @Configuration class and attempt to provide ApolloClient bean via autoconfiguration
Startup will fail due to uninitialized graphql instance

We have a candidate branch we are currently testing out and will be ready for release in the next couple weeks: spring-boot-3-candidate
. This thread has updates as well: https://github.com/Netflix/dgs-framework/issues/1340
I will close this issue in favor of the other one that is a duplicate.