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)

Most upvoted comments

The PR has been merged to master so 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 /graphql and /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:

Guys an update on the release timeline?

On Mon, 9 Jan 2023 at 23:34, Kavitha Srinivasan @.***> wrote:

Yes, please test with the spring-boot-3-candidate branch in the meantime. We are in the process of testing and expect to do a release mid-Jan.

— Reply to this email directly, view it on GitHub < https://github.com/Netflix/dgs-framework/issues/1340#issuecomment-1376036644 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ASYVC2IMRPT4JSBDOYK3EDTWRRHLXANCNFSM6AAAAAASNV5SSM

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Netflix/dgs-framework/issues/1340#issuecomment-1385567366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5JPXMY5PXNYUZYR25QGLTWS2YL7ANCNFSM6AAAAAASNV5SSM . You are receiving this because you were mentioned.Message ID: @.***>

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:

Thank you all for your work on this one! I will have to try again to get this branch working - perhaps I wait until the fork is merged into the netflix account branch

— Reply to this email directly, view it on GitHub https://github.com/Netflix/dgs-framework/issues/1340#issuecomment-1361748522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5JPXKOKRY2BLFMOHQNK53WOM65DANCNFSM6AAAAAASNV5SSM . You are receiving this because you were mentioned.Message ID: @.***>

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.