Skip to main content

application/graphql-response+json

application

The MIME type for GraphQL HTTP responses, defined by the GraphQL over HTTP specification (working draft). Servers send this instead of application/json to signal that the response is a GraphQL result. Clients should send Accept: application/graphql-response+json; older servers that do not understand it fall back to returning application/json.

Details

application/graphql-response+json is defined by the GraphQL over HTTP working draft published by the GraphQL Foundation. It is not yet IANA-registered as of 2025 but is the recommended type for new GraphQL implementations.

Why not application/json?: the GraphQL over HTTP spec created this type to allow clients to distinguish GraphQL responses from generic JSON. A GraphQL response always has a specific shape: { data: {...}, errors: [...] } – this type signals that shape.

Backward compatibility: legacy GraphQL servers return application/json. Clients should accept both. Spring GraphQL, Yoga, and Apollo Server 4+ support application/graphql-response+json.

In practice: for most existing GraphQL deployments, application/json is still returned. Check your GraphQL server's documentation for current support.

Common use

GraphQL HTTP API responses (modern servers)

See Also