Skip to content

Drop backwards compatibility#370

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

Drop backwards compatibility#370
michaelstaib wants to merge 5 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

* Remove the security note, we have a non-normative note now

* remove the table from the media types

* Add compatibility non-normative note

* Focus on JSON

* Do not repeat ourselves

* Be explicit that null or absent is equivalent to an empty map

* Move Accept compatibility to compatibility section

* no exception for the empty string

* move POST null parameters outside of a note, this is normative

* consistency

* Move the "ignore unknown keys" above because it applies to both GET and POST

* Move the 'null' references to the POST section. It doesn't make much sense for GET

* move the GET requests MUST not be mutations above examples

* Add another example for GET. Keep GET and POST sections symmetrical

* 200 is not necessarily good?

* move down

* Add application/json media type

* format

* formating

* Do not use uppercase in non-normative notes

* Move all status code requirements to the status code section

* Add an extra sentence to help with the reading flow
@martinbonnin
Copy link
Copy Markdown
Contributor

martinbonnin commented Apr 2, 2026

@michaelstaib I hear you like PRs so I merged my PR in your PR so we can fix conflicts from other PRs in this PR. I hope that's OK, let me know otherwise!

@benjie
Copy link
Copy Markdown
Member

benjie commented Apr 2, 2026

I've not read this fully, but I like the idea of moving the legacy support to an appendix. Let's make it a literal appendix - a separate file. Let's make that appendix A and I can move persisted documents to appendix B.

I'm excited for GraphQL-over-HTTP v1.1 🎉

@martinbonnin
Copy link
Copy Markdown
Contributor

@benjie sounds good 👍 There are lots of things in this PR. Let me try to break it down into smaller ones. Hopefully I can do that for today's wg 🤞

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.

6 participants