CLIENT API CLASS · UPDATED NOV 29, 2026

GQlessError & Structured Error Recovery

GraphQL APIs frequently return HTTP 200 OK even when individual resolvers fail, attaching details inside the top-level errors array. GQless wraps both network failures and GraphQL resolver errors in a single GQlessError instance so error boundaries can inspect them uniformly.

import { GQlessError } from 'gqless';

try {
  const data = await resolved(() => query.viewer.email);
} catch (err) {
  if (err instanceof GQlessError) {
    console.error('GraphQL errors:', err.graphQLErrors);
    console.error('Original network error:', err.otherError);
  }
}

Best Practices for Resilient Fetchers

Return to the Core Client API or check SSR prefetching & hydration.