GraphQL TOE (Throw On Error)

JSON →
library 1.0.0 ·javascript
verified Jun 7, 2026

A <512 byte zero-dependency library that transforms GraphQL responses by replacing errored fields with throwing getters. Version 1.0.0 stable. It solves the ambiguous `null` problem in GraphQL by throwing when you access a field that errored, allowing natural error handling with try/catch or React ErrorBoundary. Works with any GraphQL client (Apollo, URQL, fetch) that returns `{ data, errors }` — unlike Relay which has native directives. Ships TypeScript types, supports ESM and CJS.