graphql / graphql/graphql-spec
RFC: Standardize `application/graphql` with `.graphql` extension
- Dominant language
- JavaScript
- Stars
- 14.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Based on @leebyron suggestion in #203:
> I’m happy to entertain a formal RFC to add errata to the spec to explain
that .graphql is the preferred extension when saving files in the graphql
language.
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 as `text/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 on `text/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.
Contributor guide
Assessment
This issue has not been assessed yet.