Skip to content

Conversation

StevenACoffman
Copy link
Collaborator

@StevenACoffman StevenACoffman commented Mar 25, 2025

In #3555 we wanted gqlgen to accept application/graphql-response+json as but not to make it the default when no Accept header was specified. This partially reverts that change so that application/json is once more the default response mime type when no Accept header has been sent by the client.


https://graphql.github.io/graphql-over-http/draft/
GraphQL over HTTP is Draft status.
but many clients appear to support this.

for example, apollo client switch Accept header default to application/graphql-response+json.
apollographql/apollo-client#12206
Apollo Client 4.0 will be shipped at Mid April 2025
https://github.com/apollographql/apollo-client/blob/main/ROADMAP.md

Signed-off-by: Steve Coffman steve@khanacademy.org

@StevenACoffman StevenACoffman requested a review from vvakame March 25, 2025 15:08
@StevenACoffman StevenACoffman added the help wanted Extra attention is needed label Mar 25, 2025
@StevenACoffman StevenACoffman changed the title Revert default response header change from #3555 Revert default response header to application/json from #3555 Mar 25, 2025
@coveralls
Copy link

coveralls commented Mar 25, 2025

Coverage Status

coverage: 73.41% (-0.08%) from 73.49%
when pulling ccf4551 on do_not_default_to_graphql_response_mime
into 7f0d345 on master.

Signed-off-by: Steve Coffman <steve@khanacademy.org>
@StevenACoffman StevenACoffman force-pushed the do_not_default_to_graphql_response_mime branch from 8a1e47a to ccf4551 Compare March 25, 2025 16:21
@StevenACoffman StevenACoffman marked this pull request as ready for review March 25, 2025 16:30
@StevenACoffman StevenACoffman merged commit fa56a78 into master Mar 25, 2025
18 checks passed
@StevenACoffman StevenACoffman deleted the do_not_default_to_graphql_response_mime branch March 25, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants