Skip to main content
v1.0 — TypeScript-first, edge-ready

The AppSync client that fits in 3 KB.
Every auth mode. Zero dependencies.

A tiny, fully-typed, fetch-based GraphQL client for AWS AppSync — built for Node, the browser, Cloudflare Workers, Vercel Edge, Deno, and Bun. End-to-end TypeScript inference through TypedDocumentNode, retries that actually understand AppSync, and errors you can switch on.

~3 KB gzipped0 runtime deps5 auth modes97% coverage · 50 testsESM + CJS · .d.ts

A thin, opinionated middle.

Sits between hand-rolled fetch + SigV4 plumbing and the 200 KB all-batteries SDK. Optimised for teams that already have a state layer (TanStack Query, SWR, your own store) and just want a typed, correct AppSync transport.

TS
End-to-end TypeScript inference
Pass a TypedDocumentNode and the client infers both the response and the variables. One source of truth, zero hand-written response types.
Built on native fetch
Works on Node ≥ 18, modern browsers, Cloudflare Workers, Vercel Edge, Deno, and Bun. No polyfills. Tree-shakable ESM with a proper CJS fallback.
🔐
Every AppSync auth mode
API_KEY, AWS_IAM (SigV4), AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, and AWS_LAMBDA — typed as a discriminated union so bad combos won't compile.
AbortSignal · timeouts · retries
First-class cancellation. Per-request timeouts. Exponential backoff with jitter that defaults to retrying network errors, 5xx, and 429 — fully overridable.
!
Errors you can switch on
Stable code fields on every error: AppSyncGraphQLError, AppSyncHttpError, AppSyncNetworkError, AppSyncAbortError. No more stringly-typed catches.
0
Zero runtime dependencies
Nothing follows you into node_modules. SigV4 implemented with node:crypto (or browser SubtleCrypto). Audit it in 15 minutes.

Every AppSync auth mode. Same client.

One discriminated auth field, all five AWS-supported modes — including SigV4 written from scratch on node:crypto with zero dependencies. Swap type and TypeScript narrows the rest.

type: 'apiKey'type: 'cognito'type: 'oidc'type: 'lambda'type: 'iam'

Receipts.

Not a marketing claim — measured by size-limit, publint, @arethetypeswrong/cli, and Vitest in CI on Node 18 / 20 / 22 across Ubuntu, macOS, and Windows.

~3 KB
gzipped, tree-shakable ESM
0
runtime dependencies
5 / 5
AppSync auth modes
97%
line coverage · 50 tests