Skip to content

Adjust support for "application/graphql" media type so it is used only if explicitly requested #375

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
bclozel opened this issue May 4, 2022 · 0 comments
Assignees
Labels
in: web Issues related to web handling type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented May 4, 2022

As discussed with @andimarek and as seen in graphql/graphql-over-http#31, the "application/graphql MIME type is not yet officially registered and the spec is not ready for adoption. Most GraphQL libraries do not support this MIME type and are not considering it right now.

As a consequence, we should keep supporting it but stick to "application/json" as a default for now.

@bclozel bclozel added type: enhancement A general enhancement in: web Issues related to web handling labels May 4, 2022
@bclozel bclozel added this to the 1.0.0 milestone May 4, 2022
@bclozel bclozel self-assigned this May 4, 2022
@bclozel bclozel closed this as completed in 85ad5bb May 4, 2022
@rstoyanchev rstoyanchev changed the title Revert "application/graphql" as default media type Adjust support for "application/graphql" media type so it is used only if explicitly requested May 4, 2022
bclozel added a commit to spring-projects/spring-boot that referenced this issue May 4, 2022
As seen in spring-projects/spring-graphql#375, Spring Boot should also
use "application/json" as the default MIME type but remain compatible
with "application/graphql+json" still if clients POST content with this
type or explicitly accept it.

Closes gh-30860
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: web Issues related to web handling type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant