TanStack
New
TanStack Intent
Search...
K
Auto
Log In
Start
RC
Start
RC
Router
Router
Query
Query
Table
Table
DB
beta
DB
beta
AI
alpha
AI
alpha
Form
new
Form
new
Virtual
Virtual
Pacer
beta
Pacer
beta
Hotkeys
alpha
Hotkeys
alpha
Store
alpha
Store
alpha
Devtools
alpha
Devtools
alpha
CLI
alpha
CLI
alpha
Intent
alpha
Intent
alpha
More Libraries
More Libraries
Builder
Alpha
Builder
Alpha
Blog
Blog
Maintainers
Maintainers
Partners
Partners
Showcase
Showcase
Learn
NEW
Learn
NEW
Stats
Stats
YouTube
YouTube
Discord
Discord
Merch
Merch
Support
Support
GitHub
GitHub
Ethos
Ethos
Tenets
Tenets
Brand Guide
Brand Guide
TanStack Intent
/
Registry
/
@trpc/client
@trpc/client
11.16.1-canary.6 (latest) — 3 skills
11.16.1-canary.5 — 3 skills
11.16.1-canary.4 — 3 skills
11.16.1-canary.3 — 3 skills
11.16.1-canary.2 — 3 skills
11.16.1-canary.1 — 3 skills
11.16.0 — 3 skills
11.15.2 — 3 skills
11.15.2-canary.3 — 3 skills
11.15.2-canary.2 — 3 skills
11.15.1 — 3 skills
11.15.1-canary.2 — 3 skills
11.15.0 — 3 skills
11.14.2-canary.5 — 3 skills
11.14.1 — 3 skills
Copy install prompt
The tRPC client library
Skills
(3)
Skills
All Skills
3
client-setup
core
links
core
superjson
composition
Skills
3
History
client-setup
core
Create a vanilla tRPC client with createTRPCClient<AppRouter>(), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.
318 lines
links
core
Configure the tRPC client link chain: httpLink, httpBatchLink, httpBatchStreamLink, splitLink, loggerLink, wsLink, createWSClient, httpSubscriptionLink, unstable_localLink, retryLink. Choose the right terminating link. Route subscriptions via splitLink. Build custom links for SOA routing. Link options: url, headers, transformer, maxURLLength, maxItems, connectionParams, EventSource ponyfill.
302 lines
superjson
composition
Configure SuperJSON transformer on both server initTRPC.create({ transformer: superjson }) and every client terminating link (httpBatchLink, httpLink, wsLink, httpSubscriptionLink) to support Date, Map, Set, BigInt over the wire. Transformer must match on both sides. In v11, transformer goes on individual links, not the client constructor.
274 lines