In my project, I am using the graphql-java
library version 20.1, the spring-graphql
library, and the com.netflix.dgs.codege
n plugin. Recently, I started encountering an issue where the com.netflix.dgs.codegen
plugin is calling the old version of the parseDocument
method from the graphql-java
library.
This is causing an error because the method signature has changed in the newer version of graphql-java
. However, we haven’t updated the graphql-java
library in our project.
Here is the relevant part of our build.gradle.kts
file:
plugins {
java
jacoco
id("org.springframework.boot") version "3.0.2"
id("io.spring.dependency-management") version "1.1.4"
id("com.netflix.dgs.codegen") version "6.1.8"
id("org.sonarqube") version "4.2.1.3168"
}
dependencyManagement {
imports {
mavenBom("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:latest.release")
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-graphql")
implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter")
implementation("com.netflix.graphql.dgs:graphql-dgs-client")
}
And here is the relevant part of our buildSrc/build.gradle.kts
file:
dependencies {
implementation("com.graphql-java:graphql-java:20.1")
}
Why this issue is occurring even though I haven’t updated the graphql-java
library?
I checked my dependencies and expected no issues as I’m still using graphql-java v20.1
. However, the error persists. I considered transient dependencies, environment changes, and cache issues but found no root cause.