Require support of application/graphql-response+json by servers #327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of 1/1/2025, the proposed watershed date has passed. As the GraphQL over HTTP specification has not been released yet, eliminating the watershed period entirely may leave clients without adequate time to adjust to some of the new behaviors mandated by the specification.
This PR aims to separate the date that the server is required to support
application/graphql-response+json
from the date that it is required to be considered the default when noAccept
header is provided. This allows for clients to immediately take advantage of the benefits of theapplication/graphql-response+json
media type for all compliant servers.I'm suggesting that this support is required immediately. While the original concept was that the spec would be released quickly, representing the current state of GraphQL servers, this did not occur. However, the draft GraphQL-over-HTTP spec has been out since 2020, and has had no changes of substance (of any kind) since the addition of the
application/graphql-response+json
media type in Aug 2022. As such, the fact that it was not "released as a spec" makes little difference. Server implementations have had time to review and implement the new features of the draft specification, and various servers have done so.Further, releasing the spec with this change does not break existing implementations. They simply are not officially compliant until they support the new content type. And finally, popular server implementations (assuming they have been watching this repository) have been expecting this change to take effect on 1/1/2025 and would expect to be non-compliant if they did not support the new content type.
So why make this change now? I believe the sooner that all servers support the new media type, the sooner that the entire GraphQL ecosystem will adopt it. Otherwise simple clients (e.g. handwritten with
fetch
) might not be able to use the new media type if servers are not supporting it, delaying general adoption.This PR is complementary to pushing the watershed date further out as proposed within: