bug: DGS Framework not working with Spring Boot 3

See original GitHub issue

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]

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
srinivasankavithacommented, Dec 16, 2022

We have a PR in progress that is being tested and in progress: https://github.com/Netflix/dgs-framework/pull/1230#issuecomment-1355019036

1reaction
sombocheacommented, Dec 6, 2022

Also, I’m running with Spring Boot 3.x got the same problem, can’t access /graphql and /graphiql.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · Netflix/dgs-framework - GitHub
bug: DefaultDataFetcherExceptionHandler should not log an error on org.springframework.security.access.AccessDeniedException bug Something isn't working.
Read more >
Getting error while using latest Netflix DGS bom in Springboot
I am trying out using the Netflix DGS library in Springboot, and have followed the documentation for getting started. Current status is, if...
Read more >
Videos - DGS Framework
Videos¶. DGS Framework - GraphQL for Spring Boot @ OpenValue¶ ... Tech Tip # 3 - Building federated queries for tests using codegen¶....
Read more >
Home - DGS Framework - Netflix Open Source Software Center
The DGS framework makes all this available with a convenient Spring Boot programming model.
Read more >
Spring for GraphQL Documentation
Spring for GraphQL provides support for Spring applications built on GraphQL Java. It is a joint collaboration between the GraphQL Java team ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found