Skip to content
masterclass Buddy

T3 Stack · Function

createTRPCContext

createTRPCContext builds the tRPC context from the incoming request. Use it for request-dependent data, such as the user's session, while keeping request-independent values in createInnerTRPCContext.

Last updated

Syntax

createTRPCContext(opts)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • createInnerTRPCContext
  • publicProcedure
  • appRouter
  • createCaller
  • superjson
  • integration testing
  • ssg-helpers

Source: tRPC • Create T3 App. Checked 2026-11-03.