dgs-framework: bug: DGS Framework not working with Spring Boot 3
Hi guys.
With the new release of Spring Framework 6 and Spring Boot 3, I decided to upgrade my existing Spring Boot application. After going through the pain of changing the codebase to be compatible with Spring Boot 3, I realized that GQL queries using the DGS Framework stopped working with a 404. Reverting to Spring Boot 2.x and everything works as expected.
Expected behavior
Should be able to hit the configured GraphQL endpoint.
Actual behavior
You get similar error:
{"timestamp":"...","status":404,"error":"Not Found","message":"No message available","path":"/graphql (or your configured endpoint)"}
Steps to reproduce
- Create new two projects, one a Spring Boot 3 and the other Spring Boot 2.x.
- Add required DGS Framework dependencies.
- Create similar schema for both projects
- Start both projects (on different ports at the same time or one after the other).
Spring Boot 2.x project displays c.n.g.d.w.a.GraphiQLConfigurer : Configuring GraphiQL to use GraphQL endpoint at '/graphql (or your configured endpoint)' in terminal signifying OK setup of DGS Framework. Spring Boot 3 project does not display any info in terminal and returns a 404 if a query request is made to the configured endpoint.
NB: Spring Boot 3 also displays the following warning:
o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the following attributes in @com.netflix.graphql.dgs.DgsMutation with appropriate @AliasFor declarations: [field]
o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the following attributes in @com.netflix.graphql.dgs.DgsQuery with appropriate @AliasFor declarations: [field]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 21 (6 by maintainers)
The PR has been merged to
masterso any day now @raj-kindly.We have a PR in progress that is being tested and in progress: https://github.com/Netflix/dgs-framework/pull/1230#issuecomment-1355019036
Also, I’m running with Spring Boot 3.x got the same problem, can’t access
/graphqland/graphiql.Don’t know if this is entirely a bug, but there is a PR here: https://github.com/Netflix/dgs-framework/pull/1230
We will post an update here, once the release is available in the next day or so: https://netflix.github.io/dgs/announcements/
On Tue, Jan 17, 2023 at 7:05 AM Raj Garg @.***> wrote:
I just merged the PR into a new branch named
spring-boot-3-candidate. You should be able to use that branch for testing with your project in the meantime.On Wed, Dec 21, 2022 at 9:45 AM Grant Gochnauer @.***> wrote:
Thanks @srinivasankavitha @n614cd I expected this to be the case, hence why I said Q1 estimate. Certainly no hurries and we’ll look forward to the release, whenever it’s ready. 👍🏼
To be fair, I wasn’t sure if it was entirely a bug myself but good to know there’s already a PR.