Springboot GraphQL: Bad Get Request : path was not schema '/json'

1.2k Views Asked by At

I have a springboot application exposed as a graphql API. When I fire a call from postman, I see 400 error in the output. At the same time, I also see the following error in the STS console

HttpRequestHandlerImpl [{<>}]: Bad GET request: path was not >"/schema.json" or no query variable named "query" given

The strange issue is, I get the required output in postman and don't see this problem when I include the jar "log4j-1.2.17-atlassian-3-m03" in my pom file.

A quick backdrop of this issue: It all started when we tried to remove this jar as blackduck was showing a critical issue with this jar's transitive dependency pulling an older version of tomcat. I have seen almost all of stackoverflow posts on this type of issue, but none of them are giving me any clues.

Please help!

-Sriram

1

There are 1 best solutions below

0
On

Downgrading the federation-graphql-java-support to 0.5.0 dependency worked fine for me.

<dependency>
  <groupId>com.apollographql.federation</groupId>
  <artifactId>federation-graphql-java-support</artifactId>
  <version>0.5.0</version>
</dependency>

Note: You need to add jcenter repository to your pom.xml

   <repository>
      <id>jcenter</id>
      <name>jcenter</name>
      <url>https://jcenter.bintray.com</url>
    </repository>