Skip to content

Drop backwards compatibility#370

Open
michaelstaib wants to merge 4 commits intomainfrom
mst/simplification
Open

Drop backwards compatibility#370
michaelstaib wants to merge 4 commits intomainfrom
mst/simplification

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick cursory review. Couple of comments but looks good!

| `application/json` | An alternative type for responses (to support legacy clients) |
| Name | Description |
| ----------------------------------- | --------------------------------------- |
| `application/graphql-response+json` | The preferred type for server responses |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it still makes sense to use a table, now that there's only one row (same for the table for requests, above).

Also is "preferred" still the right word?

| `application/graphql-response+json` | The preferred type for server responses |

Note: Servers MAY additionally support `application/json` as a response media
type.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to link somewhere that might specify what the behavior should be? (i.e. non-200x status codes unacceptable, etc.). We (the Apollo Client team) used this document to throw errors properly for application/json and non-compliant status codes, and with the removal here, that gets lost.

But maybe thats the point of this change? 🤔

Copy link
Copy Markdown
Contributor

@martinbonnin martinbonnin Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be OK to put that as markdown file in this repo? https://github.com/graphql/graphql-over-http/LEGACY.md or something similar?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with that too! I'm mostly looking for it written down somewhere so that client libraries know what to expect.

Copy link
Copy Markdown

@phryneas phryneas Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, keeping that somewhere for reference would be greatly appreciated.

It would also be great if that document could show the q=0.9 as an example. I get why it's removed here, but implementers will need to know what to expect in real life, and some examples will keep the number of different usages down. Without examples, there will be all kinds of different strings floating around very soon.

@martinbonnin
Copy link
Copy Markdown
Contributor

martinbonnin commented Apr 2, 2026

@michaelstaib I took a stab at consistency and formatting there. I also added a application/json non-normative note containing all the gory details in a single (collapsible!) place.

You can browse it there: https://graphql-over-http.mbonnin.net/draft/#sec--application-json-response-media-type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants