ApplicationText-based
application/graphql
GraphQL
Reference for application/graphql, the MIME type for GraphQL query documents used in modern API development.
MIME Type Detector
Drop a file to detect its MIME type — no upload, runs in your browser
📄
Drop any file here or click to choose
Expected extensions: .graphql, .gql
HTTP Content-Type Header
HTTP Header
Content-Type: application/graphql; charset=utf-8Associated File Extensions
.graphql.gql
Quick Facts
| MIME Type | application/graphql |
| Category | Application |
| Type | Text-based (human-readable) |
| Extensions | .graphql, .gql |
Common Usage
GraphQL queries and schema definitions use this MIME type when sent over HTTP. It is used in API requests to GraphQL endpoints, schema-first development workflows, and code generation tools that process .graphql files to produce typed client SDKs.
Code Examples
HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.graphql" type="application/graphql">
<!-- Or for script/media elements -->
<script type="application/graphql" src="file.graphql"></script>Node.js
// Express.js
app.get('/file', (req, res) => {
res.type('application/graphql');
res.send(data);
});
// Node.js http
res.writeHead(200, { 'Content-Type': 'application/graphql' });nginx
# nginx.conf — add to types block or use default
types {
application/graphql graphql gql;
}
# Or set for a specific location
location /api/ {
default_type application/graphql;
}Related MIME Types
More Application MIME Types
Other application types in the Application family
Related Tools
Explore More MIME Types
Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.