Usage with React info Add tRPC to existing React project Server Side 1. Install dependencies 2. Enable strict mode 3. Implement your appRouter Client Side 1. Install depende...
Route Metadata Create router with typed metadata Example with per route authentication settings Route Metadata Route metadata allows you to add an optional route specific meta...
Authorization Create context from request headers Option 1: Authorize using resolver Option 2: Authorize using middleware Authorization The createContext -function is called ...
Middlewares Authorization tip Logging Context Swapping createProtectedRouter() -helper Raw input caution Middlewares You are able to add middleware(s) to a whole router w...
Define Router info Input validation Example without input With Zod With Yup With Superstruct Method chaining Define Router info A procedure can be viewed as the e...
Usage with Express.js Example app How to add tRPC to existing Express.js project 1. Install deps 2. Create a tRPC router 3. Use the Express.js adapter Usage with Express.js...
Links & Request Batching Request Batching Customizing data flow Disabling request batching 1. Disable batching on your server: 2. Use batch-free link in your tRPC Client Using...
Usage with Fastify Example app How to use tRPC with Fastify Install dependencies Create the router Create the context Create Fastify server How to enable subscriptions (WebSo...
Vanilla client Initialize a tRPC client Vanilla client The magic of tRPC is making strongly typed API calls without relying on code generation. With full-stack TypeScript proje...
tRPC Watch Video Introduction An alternative to traditional REST or GraphQL Introducing tRPC tRPC End-to-end typesafe APIs made easy Watch Video Alex / KATT an...