T3 Stack · Pipe
server
tRPC lets a TypeScript frontend call backend procedures with inferred types and autocomplete. You define validated procedures in routers, merge them into an app router, and export its type for the client.
Last updated
Syntax
createTRPCRouter({ name: publicProcedure.input(schema).query(({ ctx, input }) => result) })In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createTRPCRouterpublicProcedureprotectedProcedurecreateTRPCContextcreateInnerTRPCContextappRoutersuperjsonReact Query