GraphQL Response Analyzer
Analyze GraphQL JSON responses online. Inspect partial data, errors, response paths, null values, extensions and response structure with browser-based analysis.
Partial Response: Data was returned for resolved fields alongside GraphQL errors for failed resolvers.
Key Observations & Insights
Top-Level Response Structure
Value Types Distribution (9 Total)
How to Use
1. What is a GraphQL Response?
A GraphQL Response is a JSON document returned by a GraphQL server following the execution of a query, mutation, or subscription. Unlike traditional REST API endpoints that emit varying response schemas and rely solely on coarse HTTP status codes (such as 200, 400, 404, or 500), the GraphQL specification establishes a strict top-level response envelope.
A GraphQL response may contain a data map, an errors list, and an optional extensions map. Because individual GraphQL resolvers execute independently, a response can succeed partially—returning requested data for healthy resolvers while simultaneously cataloging granular errors for failed resolvers.
2. Standard GraphQL Response Envelope (data, errors, extensions)
According to Section 7 of the official GraphQL Specification, a valid response document contains up to three standardized top-level keys:
Contains the result of evaluated field selections. If execution fails before execution begins (e.g. syntax or validation error), data must not be present.
A non-empty list of error entries, each specifying an error message, optional path array, locations, and extensions.
Reserved for protocol extensions, performance tracing metadata, caching hints, and server diagnostics.
3. How to Analyze a GraphQL Response
Follow these steps to analyze and debug any GraphQL response payload:
- Paste Response: Paste your raw JSON response into the Monaco editor or click Load Example to test with 10 real-world scenarios.
- Analyze: Click Analyze or press Ctrl+Enter (or keep Live Analysis enabled for instant updates).
- Review Health: Inspect the Response Health card to see whether the payload is classified as Success, Partial Response, Error Response, Generic JSON, or Invalid JSON.
- Inspect Errors: Navigate to the GraphQL Errors tab to review error codes, resolver paths (e.g.
$.data.user.email), and path resolution states. - Jump to Line: Click Line X or Find in Tree on any error or null path to focus and scroll directly to that exact target.
- Explore Data Tree: Expand and search the interactive Tree Explorer to inspect nested objects, arrays, and field types.
- Export Report: Copy or download structured JSON, formatted Markdown audit reports, or CSV error exports.
4. Response Health: Success vs. Partial vs. Request Error
| Status | Condition | Meaning & Client Impact |
|---|---|---|
| SUCCESS | data present, errors absent | All requested fields resolved without exception. Full clean data payload. |
| PARTIAL RESPONSE | data present, errors present | Some fields resolved successfully while specific resolvers threw errors and returned null. |
| ERROR RESPONSE | errors present, data absent or null | Operation failed globally (e.g. syntax, validation, or non-nullable root field failure). |
| GENERIC JSON | Valid JSON array or non-GraphQL object | Payload is valid JSON but does not follow the GraphQL response envelope. Generic inspection active. |
| INVALID JSON | Malformed JSON syntax | Payload contains syntax errors (unquoted keys, missing commas, truncated network buffer). |
5. Request Errors vs. Field Execution Errors
The GraphQL specification draws a critical distinction between two distinct classes of errors:
Occur before query execution begins, such as GraphQL syntax errors, query document validation failures, unknown fields, or missing mandatory variables. When a request error occurs, the server emits an errors array and must not return a data field.
Occur during field resolver execution (e.g. database timeouts, microservice outages, or permission checks). In this scenario, healthy fields resolve normally into data while the failed field resolves to null and appends a granular entry with its path to errors.
6. Error Analysis: Messages, Paths, Locations & Codes
The path array precisely specifies where the resolver error occurred in the response tree (e.g. ["users", 2, "email"] maps to $.data.users[2].email).
Standard error codes (such as UNAUTHENTICATED, FORBIDDEN, BAD_USER_INPUT, or NOT_FOUND) provide machine-readable error handling for client apps.
7. Null Values & Non-Null Propagation Explained
Null values in GraphQL can represent legitimate empty fields, resolver exceptions, or non-null error propagation:
- Application Data Nulls: Legitimate empty values (e.g. an optional user avatar or phone number that was never set).
- Direct Error-Correlated Nulls: Nulls where an entry in
errorsexplicitly identifies that field's path. - Non-Null Propagation Nulls: When an error occurs on a non-nullable field (e.g.
email: String!), GraphQL cannot return null for it. The error bubbles up to the nearest nullable parent field, setting that parent to null. The error path points to the deeper child, while the response data contains null on the parent.
8. Interactive Response Tree Explorer & JSONPath Copying
The Tree Explorer converts large GraphQL JSON documents into an interactive, expandable tree. Developers can search across keys, values, and paths, expand/collapse sub-trees, copy JSONPaths, and click any node to immediately reveal its exact line in the Monaco editor.
9. Payload Sizing & Structural Statistics (UTF-8 Bytes vs Chars)
Calculates the deepest nested branch in the data hierarchy.
Identifies top-level and nested arrays by length and objects by field count.
Measures exact byte footprint and character counts without network assumptions.
10. Understanding the Extensions Field (Tracing & Caching)
The extensions map provides a standard protocol mechanism for server diagnostics. Common extension payloads include:
- Apollo Tracing: Execution timestamps, resolver execution offsets, and sub-millisecond durations.
- Cache Control: Granular caching hints (
maxAge,scope: PUBLIC/PRIVATE) for CDN proxies. - Rate Limiting: Remaining query point quotas and reset timestamps.
12. Step-by-Step Practical Debugging Walkthrough
Consider this partial response from an e-commerce API:
{
"data": {
"user": {
"id": "usr_100",
"name": "Jane Doe",
"email": null
}
},
"errors": [
{
"message": "Email service unavailable",
"path": ["user", "email"],
"extensions": {
"code": "SERVICE_UNAVAILABLE"
}
}
]
}Analysis Summary:
- Classification:
PARTIAL RESPONSE. - Resolved Fields:
user.idanduser.nameare present. - Failed Resolver:
user.emailfailed and bubbled tonull. - Error Code:
SERVICE_UNAVAILABLE(Category: Resolver).
13. CSV Error Export & Markdown/JSON Reporting
Generate comprehensive documentation for pull requests, bug reports, and incident reviews:
- CSV Export with Injection Mitigation: Exports errors with automatic single-quote escaping on trigger characters (
=,+,-,@) to protect against spreadsheet formula injection. - Markdown Summary: Formatted report ready for GitHub pull requests and Slack postmortems.
- Machine-Readable JSON: Structured JSON audit for automated CI/CD assertion pipelines.
14. 100% Client-Side In-Browser Privacy Guarantee
All JSON parsing, recursive tree generation, null analysis, error categorization, and report formatting execute entirely within your web browser using client-side JavaScript. No response payloads, user records, or tokens are ever sent to ToolMono servers.
15. Authoritative References & Standards
Consult official specifications from the GraphQL Foundation and IETF:
GraphQL Official Specification: Response Format (Section 7)
Authoritative specification for GraphQL data, errors, and extensions serialization.
GraphQL Official Specification: Errors (Section 7.3)
Official specification for error messages, paths, locations, and extensions.
GraphQL.org Error Handling & Partial Response Guide
Official guide for handling GraphQL errors and partial responses.
RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format
IETF standard for JSON grammar and parsing.
16. Frequently Asked Questions (15 FAQs)
Related Tools
Browse all toolsGraphQL Playground
Test GraphQL APIs online with an interactive query editor, variables, headers, schema introspection, documentation explorer, response viewer, and GraphQL error debugging.
JSON Formatter
Free online JSON formatter, beautifier, and validator. Format, indent, minify, and inspect JSON with real-time syntax error detection in your browser. 100% client-side.
HTTP Headers Checker
Check HTTP response headers online, audit security headers (CSP, HSTS, CORS), inspect cookies, detect information disclosure, and review caching policies.
OpenAPI Request Generator
Generate ready-to-use API requests from OpenAPI and Swagger specifications. Select an endpoint, configure parameters and authentication, and instantly generate cURL, JavaScript Fetch, Axios, Python Requests, Node.js, and Raw HTTP examples.
JSON Diff Checker
Compare two JSON files or objects online and find structural differences instantly. Detect added, removed, and modified values with nested key paths in your browser.
cURL to Code
Convert cURL commands into code for Python, JavaScript, Node.js, Go and PHP. Preserve headers, auth, cookies, and JSON bodies with ToolMono's free in-browser converter.