T3 Stack · Concept
Data transformer
tRPC lets you define TypeScript API procedures on the server and call them from the frontend with inferred types. It avoids API code generation and keeps client calls type-safe.
Last updated
Syntax
createTRPCRouter({ procedureName: publicProcedure.input(schema).query(({ ctx, input }) => result) })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createTRPCContextcreateInnerTRPCContextcreateTRPCRouterpublicProceduremiddlewaresuperjsonhttpBatchLinkloggerLink