-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RFC: Standardize application/graphql
with .graphql
extension
#988
Comments
Should we add |
Makes sense. |
Didnt we just recently move to |
After chatting with Ivan I've raised a PR proposing changing the media type used for GraphQL responses from an HTTP API to Despite this PR, I think |
+1 here. Will add that in scenarios where a codebase has graphql files that define both operations and schema definition, it can help denote the difference by using |
I want to add: this should also register |
Based on @leebyron suggestion in #203:
I propose to submit
application/graphql
with.graphql
as an extension to the official MIME DB:https://www.iana.org/assignments/media-types/media-types.xhtml
application/graphql
already used by community see:https://grep.app/search?q=application/graphql
Note: technically, there are substantial benefits to having it as
text/graphql
(same astext/html
). For example, OS will open files with a text editor, and browsers show content as text.But since
application/graphql
is already in many places standardizing ontext/graphql
will add a lot of confusion.It looks like the process of submitting MIME type is pretty straightforward:
https://www.iana.org/form/media-types
We just need to claim it in a spec and submit the form.
I will work on spec PR in a short while, I just want to use this issue as a talking point for discussion in https://github.com/graphql/graphql-over-http repo.
The text was updated successfully, but these errors were encountered: