Error while making a request to graphql project #1534
-
My project is starting up correctly, but during runtime when i am hitting the endpoint, i am getting this error mentioned below:
I am using netflix dgs version 7.0.0 and java 17 and springboot version 3.0.6 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
@srinivasankavitha can you assist me in this error? |
Beta Was this translation helpful? Give feedback.
-
It appears you may have a conflicting dependency that is pulling in a
different graphql-java version. With 7.0.0 we updated the dgs framework to
graphql-java 20.2 and I suspect the error you are getting is related to
that. You could run dependency insights command from gradle and inspect the
dep tree to see what its going on to debug further.
…On Thu, May 25, 2023 at 9:53 AM Shamsuddin ***@***.***> wrote:
my POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.demo</groupId>
<artifactId>documentation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>documentation</name>
<description>Documentation Subgraph</description>
<properties>
<java.version>17</java.version>
<spring-cloud.version>2022.0.0-RC3</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-platform-dependencies</artifactId>
<version>7.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-pagination</artifactId>
</dependency>
<dependency>
<groupId>com.tailrocks.graphql</groupId>
<artifactId>graphql-datetime-dgs-starter</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-vault-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.github.deweyjose</groupId>
<artifactId>graphqlcodegen-maven-plugin</artifactId>
<version>1.33</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<subPackageNameDatafetchers>graph.query</subPackageNameDatafetchers>
<subPackageNameTypes>graph.schema</subPackageNameTypes>
<schemaPaths>
<param>src/main/resources/graphql/documentation.graphqls</param>
</schemaPaths>
<typeMapping>
<DocumentationTitleConnection>graphql.relay.SimpleListConnection<DocumentationTitle></DocumentationTitleConnection>
<DocumentationProductConnection>graphql.relay.SimpleListConnection<DocumentationProduct></DocumentationProductConnection>
</typeMapping>
<packageName>com.demo.documentation</packageName>
<outputDir>${project.build.directory}</outputDir>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-libs-milestone</id>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
</repositories>
</project>
—
Reply to this email directly, view it on GitHub
<#1534 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXKZA775DF2VYDIQ6LLXH6FATANCNFSM6AAAAAAYO27RT4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'm not sure how you can force it in maven. But in gradle, you can override
and force the dependency version, so yeah I would try that.
…On Thu, May 25, 2023 at 10:50 AM Shamsuddin ***@***.***> wrote:
from dependency tree, i can see under dgs, it has graphql-java 19.5
Any idea if this issue can be resolved by overriding any dependencies
manually?
mentioned below is the complete dependency tree:
—
Reply to this email directly, view it on GitHub
<#1534 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXNRXVKONO6GC7Q7MMTXH6LWTANCNFSM6AAAAAAYO27RT4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
added dependency:
This overrides all the graphql-java dependencies and resolved the above issue. |
Beta Was this translation helpful? Give feedback.
added dependency:
This overrides all the graphql-java dependencies and resolved the above issue.
Thankyou @srinivasankavitha for pointing out the dependencies mismatch