---
package: "@tanstack/react-query"
version: "^5.66.0"
tier: core
decision: approved
date: 2026-05-14
deciders: [scaffolded]
adr: null
filter-results:
  license: MIT
  types: native
  maintenance: active
  boundary-fit: pass
  shadow-check: pass
  eu-residency: n/a
  cve-scan: clean
  named-consumer: pass
verification-commands:
  - pnpm audit --audit-level=moderate
  - npm view @tanstack/react-query license
accepted-cves: []
---

## Filter: license

MIT — on the workspace allowlist.

## Filter: types

Ships first-party TypeScript types in its distribution.

## Filter: maintenance

Active. Maintained by the TanStack team; v5 is the current stable major.

## Filter: boundary-fit

Core package (client-side). Used exclusively in `core-trpc` to power the React Query integration layer. No boundary rule violation.

## Filter: shadow-check

No other server-state library in the workspace. No shadow.

## Filter: eu-residency

Client-side state management; no network calls to vendor endpoints. n/a.

## Filter: cve-scan

No advisories at adoption time.

## Filter: named-consumer

`core-trpc` exposes the `QueryClient` and React Query hooks via `@trpc/react-query`.

## Prompt: replaces

Nothing — this is the initial tRPC scaffold.

## Prompt: migration-cost-out

Hard: query keys, cache invalidation patterns, and mutation hooks are all shaped around React Query's API.

## Prompt: alternatives-considered

1. **SWR** — narrower feature set; less aligned with tRPC's first-class React Query adapter.
2. **RTK Query** — Redux-bound; heavier than needed for this use case.
React Query is tRPC's canonical client-side data-fetching companion.
