Skip to content

Update outdated bits related to graphql-over-http #1394

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

trevor-scheer
Copy link
Contributor

This PR removes and updates related to the graphql-over-http spec.

  • The application/graphql content-type has been superseded and shouldn't be recommended anymore
  • The graphql-over-http spec makes no recommendation about handling query string parameters during a POST request

@Urigo
Copy link
Contributor

Urigo commented Apr 9, 2023

@enisdenjo can you review?

A detailed [HTTP & websockets transport specification](https://github.com/graphql/graphql-over-http) is in development. Though it is not yet finalized, these draft specifications act as a single source of truth for GraphQL client & library maintainers, detailing how to expose and consume a GraphQL API using an HTTP transport. Unlike the language specification, adherence is not mandatory, but most implementations are moving towards these standards to maximize interoperability.
Copy link
Member

Choose a reason for hiding this comment

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

Also SSE transport.


Why's adherence not mandatory? In order to be GQL over HTTP compliant - it is mandatory. I'd recommend rephrasing or just removing this sentence altogether.

Copy link
Member

Choose a reason for hiding this comment

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

It's not mandatory to be GraphQL compliant; you can be GraphQL compliant without being GraphQL-over-HTTP compliant. For example, persisted operations (over HTTP) still comply with the GraphQL spec but don't (currently) comply with GraphQL-over-HTTP.

Also I'd replace "HTTP & websockets & SSE" with just "HTTP" - all of these things are part of HTTP.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW I didn't actually make edits to this section (looks like my editor added a missing newline). But agree with @benjie 's suggestion here and will simplify this to just "HTTP"

@Urigo
Copy link
Contributor

Urigo commented Apr 11, 2023

@trevor-scheer we've just merged a change with prettier, could you please rebase?
Thanks and sorry for the inconvenience

* The `application/graphql` content-type is no longer recommended via the graphql-over-http spec
* The graphql-over-http spec makes no recommendation of parsing the `query` query parameter for POST requests
@trevor-scheer
Copy link
Contributor Author

@Urigo no worries, done!

@Urigo Urigo merged commit e4b04b3 into graphql:source Apr 11, 2023
@Urigo
Copy link
Contributor

Urigo commented Apr 11, 2023

thank you @trevor-scheer !

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.

4 participants