0

My application runs on Java 8 and Springboot 2.2.5.RELEASE and I am using below dependencies to expose a GraphQL service.

<dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-spring-boot-starter</artifactId>
            <version>${graphql.version}</version>
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-java-tools</artifactId>
            <version>${graphql.version}</version>
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphiql-spring-boot-starter</artifactId>
            <version>${graphql.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

I have kept my schema in src/main/resources/graphql/mobile.graphqls

type Mobile {
    msisdn: String!
    iccid: String!

}

type Query {
    loadMobileByKey(msisdn: String!, iccid: String!): Mobile
}

and the below is my GraphQLQueryResolver

@Component
public class MobileController  implements GraphQLQueryResolver {
    private static final Logger LOGGER = LoggerFactory.getLogger(MobileController.class);

    @PostConstruct
    public void test(){
        LOGGER.info("Bean MobileController initialized");
    }

    public Mobile loadMobileByKey(String msisdn,String iccid) {
        return new Mobile(msisdn,iccid);
    }
}

Enabled the DEBUG logs and I have observed that conditional logs has some discrepancies

============================
CONDITIONS EVALUATION REPORT
============================


Negative matches:
----------------- 

    GraphQLJavaToolsAutoConfiguration:
      Did not match:
         - @ConditionalOnClass did not find required class 'com.coxautodev.graphql.tools.SchemaParser' (OnClassCondition)

   GraphQLWebAutoConfiguration:
      Did not match:
         - AnyNestedCondition 0 matched 2 did not; NestedCondition on OnSchemaOrSchemaProviderBean.OnSchemaProvider @ConditionalOnBean (types: graphql.kickstart.execution.config.GraphQLSchemaProvider; SearchStrategy: all) did not find any beans of type graphql.kickstart.execution.config.GraphQLSchemaProvider; NestedCondition on OnSchemaOrSchemaProviderBean.OnSchema @ConditionalOnBean (types: graphql.schema.GraphQLSchema; SearchStrategy: all) did not find any beans of type graphql.schema.GraphQLSchema (OnSchemaOrSchemaProviderBean)
      Matched:
         - @ConditionalOnClass found required class 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
         - @ConditionalOnWebApplication (required) found 'session' scope (OnWebApplicationCondition)
         - @ConditionalOnProperty (graphql.servlet.enabled=true) matched (OnPropertyCondition)
         


Positive matches:
-----------------

   GraphQLInstrumentationAutoConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration' (OnClassCondition)
      - @ConditionalOnProperty (graphql.servlet.enabled=true) matched (OnPropertyCondition)

   GraphiQLAutoConfiguration matched:
      - @ConditionalOnClass found required class 'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
      - @ConditionalOnWebApplication (required) found 'session' scope (OnWebApplicationCondition)

   GraphiQLAutoConfiguration#graphiQLController matched:
      - @ConditionalOnProperty (graphiql.enabled=true) matched (OnPropertyCondition)        

when I am trying to hit this graphql api from postman I am getting below error

{
    "timestamp": "2025-08-28T14:08:18.360+0000",
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/graphql"
}

I am getting the same issue when access it from graphiql in-browser IDE

2
  • May I ask why java 8 and Spring boot 2? Commented Aug 28 at 14:30
  • There is a plan to upgrade in the future , but currently we are looking for interim solution Commented Aug 29 at 11:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.