tRPC
Backend & Infra🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
Release History
View all versions →v11.18.02 fixes1 featureThis release introduces server URL support for OpenAPI generation and includes several minor fixes in CI and tanstack-react-query integration.
v11.17.03 fixes1 featureThis release introduces subscription inference helpers and fixes several bugs, including handling React 19 proxy coercion and improving streaming error unwrapping. It also includes numerous dependency updates.
v11.16.01 fix4 featuresThe @trpc/openapi package receives significant updates, including hardened support for cyclic types and the removal of the type depth limit. Several minor fixes related to schema description gathering were also implemented.
v11.15.2v11.15.12 fixesThis patch release includes fixes for rendering sponsor links in static HTML for SEO and improving error handling within Node VM environments.
v11.15.01 fix1 featureThis release introduces server-side configuration for maximum batch size and fixes an issue with pathExtractor returning null by providing an empty string fallback.
v11.14.11 featureThis minor release introduces Tanstack Intent Skills as a new feature.
v11.14.02 fixesThis release focuses on bug fixes related to stream handling, specifically addressing error handling in batch streams and chunk preservation upon stream closure.
v11.13.4v11.13.3v11.13.21 fix2 featuresThis release introduces OpenAPI JSON generation support for all tRPC app routers and adds the `streamHeader` option to `httpBatchStreamLink`. It also includes documentation improvements and a minor typo fix.
v11.13.1v11.13.0v11.12.1v11.12.02 fixesThis release addresses two specific bugs concerning type errors in useSuspenseInfiniteQuery and reconnection logic for SSE subscriptions.
v11.11.01 fix2 featuresThis release focuses on documentation improvements, including fixes for zod generics and context notes, alongside exporting new types for client usage.
v11.10.01 fix2 featuresThis release introduces enhancements for error handling in local links and adds batch indexing support for server-side procedures and middleware, alongside a fix for client connection parameter encoding.
v11.9.01 featureThis release introduces an experimental option for WebSocket encoding and welcomes new contributors.
v10.45.41 fixThis patch release fixes a corruption issue in the package.json file to ensure proper package installation.
v10.45.31 fixA security patch release addressing a vulnerability identified in GHSA-43p4-m455-4f4j.
v11.8.13 fixesThis patch release focuses on bug fixes for subscription handling, TanStack React Query prop tracking, and Fastify type definitions.
v11.8.01 fix1 featureThis release introduces streaming support for AWS API Gateway REST APIs and addresses a security advisory regarding cross-site scripting.
v11.7.21 fixThis patch release fixes a bug where SSE options were not correctly applied when using merged routers in tRPC server.
v11.7.11 fixThis patch release addresses a bug in the TanStack React Query integration regarding undefined key prefixes.
v11.7.02 fixes1 featureThis release introduces prefix options for Query and Mutation keys in TanStack React Query and includes fixes for websocket initialization and server type exports.
Common Errors
UnhandledTrpcError1 reportUnhandledTrpcError usually arises when an error is thrown within a tRPC procedure that isn't caught and properly transformed into a `TRPCError`. Ensure you wrap procedure logic in try/catch blocks, using `throw new TRPCError({ code: 'WHATEVER_CODE', message: 'Helpful error message' })` to surface meaningful errors to the client. For errors originating outside procedures (middleware, global error handlers), verify you construct and throw a `TRPCError` instance to signal an expected error state.
TRPCClientError1 reportTRPCClientError usually arises when the server-side TRPC procedure throws an error that isn't properly serialized or handled by the client. To fix it, ensure server-side errors are instances of `TRPCError` from `@trpc/server`, and that your client-side code correctly handles `TRPCClientError` by checking its `TRPC_ERROR_CODE_KEY` to determine the specific server-side error.
StreamInterruptedError1 reportStreamInterruptedError in tRPC often arises when a stream is prematurely terminated by the client (e.g., navigating away) before all data is received. To fix this, ensure your server-side streaming procedure gracefully handles cancellation signals by closing the stream or `AsyncGenerator` when the `signal` is aborted, preventing further data emissions. Additionally, catch any potential exceptions thrown by the underlying stream (e.g., if the resource it's reading from disappears) and ensure they are properly handled and propagated to the client as a trpc error instead of letting them interrupt the main tRPC stream.
Related Backend & Infra Packages
Production-Grade Container Scheduling and Management
Node.js JavaScript runtime ✨🐢🚀✨
Promise based HTTP client for the browser and node.js
A modern runtime for JavaScript and TypeScript.
Deliver web apps with confidence 🚀
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Subscribe to Updates
Get notified when new versions are released