Middlewares Authorization tip Logging Context Swapping createProtectedRouter() -helper Raw input caution Middlewares You are able to add middleware(s) to a whole router w...
Output Validation info Examples With Zod With Yup With Superstruct With custom validator Output Validation tRPC gives you automatic type-safety of outputs without th...
Quickstart tip Installation Installation Snippets Defining a router Create a router instance Add a query endpoint Add a mutation endpoint Next steps Quickstart tip We h...
Quickstart tip Installation Installation Snippets Defining a router Create a router instance Add a query endpoint Add a mutation endpoint Next steps Quickstart tip We ...
useQuery() Example useQuery() The hooks provided by @trpc/react are a thin wrapper around React Query. For in-depth information about options and usage patterns, refer to the...
Links & Request Batching Request Batching Customizing data flow Setting a maximum batch size Disabling request batching 1. Disable batching on your server: 2. Use batch-free li...
Authorization Create context from request headers Option 1: Authorize using resolver Option 2: Authorize using middleware Authorization The createContext -function is called ...
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 ...
Example Apps Example Apps You can clone trpc and play with local examples, or play with them in the CodeSandbox link below. Here’s some example apps: Description URL Links Rec...