/graphql endpoint is not exposed with Spring Boot 2.6.2
sergejsvisockis opened this issue · 4 comments
Describe the bug
Adding all required dependencies, e.g. (all of them have the latest versions and Spring Boot 2.6.2) :
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java</artifactId>
</dependency>
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphiql-spring-boot-starter</artifactId>
</dependency>Also all graphQL schemas a properly created as well as Query Resolvers are also properly defined. /graphql endpoint is not exposed.
To Reproduce
Steps to reproduce the behavior:
- Create Spring Boot 2.6.2 project
- Add graphql dependencies
- Create schemas
- Create query resolvers from these schemas
- Start application and try to reach
/graphqlendpoint - Face issue
Expected behavior
/graphql endpoint is accessible.
Desktop (please complete the following information):
- OS: MacOS 12.1
- Browser: Chrome 97.0.4692.99
Don't include graphql-Java yourself, but let it be pulled in. I can't reproduce this. Have no problems with 2.6.2 or 2.6.3. Recheck your local config please and try to create and share a minimal example project reproducing the issue.
You might want to enable spring boot debug to be able to analyze spring boot issues explaining why it's not being exposed.
@oliemansm I see. You are right, you already have these dependencies in your starters' POM. By the way is it required to define a GraphQLSchema bean? Maybe this is the reason that nothing works? I mean in case if this bean is not created.
It's not if you use GraphQL Java tools. Assuming that's what you want to use then you're missing that dependency. Since version 12 you need to explicitly add the GraphQL Java tools starter as a dependency too. See the sample project in the samples repo. The graphiql starter is no longer in use, since it's included in the main starter and configurable through props.
yes, you are right. w/ simple project it works. probably some issues w/ setup.
closing issue.
thanks!