Content-Type 'application/graphql' is no longer supported with graphql-dgs-spring-graphql-starter?
Before I qualify this as a potential bug I just wanted to ask if application/graphql should still be supported as media type after switching from graphql-dgs-spring-boot-starter to graphql-dgs-spring-graphql-starter?
This used to be a valid media type as used in DgsRestController, but after switching to the new starter this controller is no longer used. Spring supports application/json and application/graphql-response+json, and deprecated support for application/graphql+json, but I don't see support for application/graphql.
Vice versa, it seems that application/graphql-response+json is not supported in DgsRestController.
I ran into this last week as well and reported it (over chat) to the Spring GraphQL maintainers. They'll have a look at it. It should be supported, but seems to have an issue.
I see it got added: https://github.com/spring-projects/spring-graphql/issues/1038 / https://github.com/spring-projects/spring-graphql/issues/1036.
What about application/graphql-response+json in DGS itself, is that supposed to be supported?
I retested this and using Content-Type: application/graphql seems to work (again).
There is a difference tho. In the current unpublished spec it expects JSON for a application/graphql request. In the original DGS implementation, the request would not be JSON, it would be expect the query itself to be the body of the request.
This no longer works.
While this is an unintentional breaking change, I think the Spring GraphQL behavior is what we want now, since that's where the spec is heading. The DGS behavior was based on some tools like Intellij that have changed now as well.
I'm closing this because I don't think we can take further action.