| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| graphql-request@7.3.3 source code.tar.gz | 2025-11-11 | 145.5 kB | |
| graphql-request@7.3.3 source code.zip | 2025-11-11 | 181.4 kB | |
| README.md | 2025-11-11 | 1.2 kB | |
| Totals: 3 Items | 328.1 kB | 0 | |
Bug Fixes
- Non-JSON Error Response Handling: Fixed regression in 7.3.2 where servers returning HTTP 4xx/5xx status codes with non-JSON response bodies (HTML, plain text) would throw an unhelpful error:
"Invalid execution result: result is not object or array"(#1459, closes [#1458]) - Added safe JSON parsing fallback for responses without proper Content-Type headers
- Returns descriptive error messages with response body preview for non-JSON responses
- Handles common production scenarios: load balancer errors (502/503 HTML pages), CDN errors, WAF/firewall responses, misconfigured servers
- Maintains backward compatibility for servers that omit Content-Type but return valid JSON
- Added comprehensive test coverage for HTML, plain text, and missing Content-Type scenarios
What Changed
Version 7.3.2 introduced a bug where the ELSE branch in parseResultFromResponse would pass raw strings (HTML, plain text) to a parser expecting objects/arrays. This only surfaced when:
1. Server returns 4xx/5xx status code
2. Content-Type header is missing or non-JSON (e.g., text/html, text/plain)
3. Response body is not valid JSON
This is now fixed with graceful error handling and clear error messages.