dgs-framework: bug: 5.4.0 does not properly upgrade grapqhl-java to 19.0
Considering the release notes, it should be upgraded to 19.0, but for me it is still on 18.3, leading to issues like.
- Gradle 7.5.1
- Java 17
- netflix dgs 5.4.0
- spring boot 2.7.4
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'schema' threw exception; nested exception is java.lang.NoSuchMethodError: 'graphql.schema.idl.RuntimeWiring graphql.schema.idl.RuntimeWiring.transform(java.util.function.Consumer)'
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 78 more
Caused by: java.lang.NoSuchMethodError: 'graphql.schema.idl.RuntimeWiring graphql.schema.idl.RuntimeWiring.transform(java.util.function.Consumer)'
at com.apollographql.federation.graphqljava.Federation.ensureFederationDirectiveDefinitionsExist(Federation.java:194)
at com.apollographql.federation.graphqljava.Federation.transform(Federation.java:67)
at com.netflix.graphql.dgs.internal.DgsSchemaProvider.computeSchema(DgsSchemaProvider.kt:184)
at com.netflix.graphql.dgs.internal.DgsSchemaProvider.schema(DgsSchemaProvider.kt:122)
at com.netflix.graphql.dgs.autoconfig.DgsAutoConfiguration.schema(DgsAutoConfiguration.kt:206)
Currently using this to fix that
dependencyManagement {
dependencies {
// FIXME: Fixing open CVEs - remove when the transitive dependencies have been updated
dependency "org.yaml:snakeyaml:1.33"
dependency "net.datafaker:datafaker:1.6.0"
dependency "com.google.protobuf:protobuf-java:3.21.7"
dependency "com.graphql-java:java-dataloader:3.2.0"
// Fix netflix dgs graqphl java update
dependency "com.graphql-java:graphql-java:19.2"
dependency "com.graphql-java:graphql-java-extended-scalars:19.0"
}
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 26 (10 by maintainers)
Hi…
In my maven SB 2.7 project I cannot control the bom order (I get Spring from parent) but adding this property will override the graphql-java version for maven users…
In maven you need to order the dependency mgmt with DGS above Spring boot:
This appears to be working…2.7.8 & 5.5.1. When I had the DSG entry after, it would pull the v18 version from spring boot. Since this is a multi-module system I’m not super happy with this, but it’s optional at this point.
This is still a problem with Maven. Can we re-open this ticket?
This still appears to be a problem. Using DGS version 5.4.3 with Spring Boot 2.7.5. Using Maven, not Gradle.
returns
This is the only place in the dependency tree that
com.graphql-java:graphql-javaappears. v19.2 is nowhere to be seen. I tried clearing out the .m2 directory as well. Still pegged to 18.3. I’d prefer not adding an exclusion if possible so that dependent libraries can be kept in sync more easily for version upgrades.We’ll need to update our codegen to also use the latest graphql-java version. Will update and do a release.
We have a working example of Spring Boot 2.7 with DGS 5.5.1 here: https://github.com/Netflix/dgs-examples-java-2.7
On Wed, Jan 25, 2023 at 3:02 PM SquireOfSoftware @.***> wrote:
@srinivasankavitha Oh interesting! My project was Spring Boot
2.7.3, JDK 17 and it seemed only DGS5.3.0worked for it, anything higher seemed to fail.EDIT: 🤣 🤣 maybe I am an outlier
This is still a problem with Maven. Can we re-open this ticket?