application/graphql-response+json

All MIME types
Application · Standards tree · GraphQL over HTTPheader only

Media type / application

application/graphql-response+json

The registered response type for GraphQL over HTTP, which lets a client tell a real GraphQL result from a proxy's error page.

Served inline: Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.

Browser behaviour

Downloads

Charset

charset ignored

Compression

Compress in transit

Send it like this

Content-Type: application/graphql-response+json

The format defines its own encoding, so no charset parameter is registered for this type. Sending one is harmless, but receivers are required to ignore it — it is not doing what people think it does.

Handling verdict

InlineDownloads

Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.

Charsetcharset ignored

The format defines its own encoding, so no charset parameter is registered for this type. Sending one is harmless, but receivers are required to ignore it — it is not doing what people think it does.

CompressionCompress in transit

The payload is text-like or otherwise repetitive, so gzip or Brotli removes real bytes. Enable it at the server or CDN.

NameStandards tree

Registered with IANA through a public review process, so the name is stable and every implementation can rely on it meaning the same thing.

Anatomy of the name

RFC 6838

Top-level type

application

Application

Subtype

graphql-response+json

Registered in the standards tree.

Structured syntax

+json

Any client that can parse JSON can read the payload, even without understanding this specific type.

Parameters

none

Beyond the charset rule above, this type defines no parameters of its own.

What trips people up

1 note
  • Under this type a request that fails validation returns 400, where legacy application/json responses returned 200 with an errors array.

Response headers

Content-Type: application/graphql-response+json
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename="example"
Vary: Accept-Encoding

nosniff stops the browser second-guessing the type you declared, which is what makes the rest of this reliable. Content-Disposition: attachment names the saved file and removes any doubt about rendering.

Server configuration

route header

nginx

# application/graphql-response+json has no file extension — set it on the route instead
add_header Content-Type "application/graphql-response+json";

Apache

# application/graphql-response+json has no file extension — set it on the handler instead
Header set Content-Type "application/graphql-response+json"

Caddy

header Content-Type "application/graphql-response+json"

Related media types

8
Familyapplication
Treestandards
Suffix+json
Inlinedownload