Add parameters to tRPC Context
I would like to add the parameters of the type
CreateNextContextOptions
to my tRPC context in my t3-app project. I've looked through the documentation, but I cannot find a way to get the parameters to pass them to the createContext function in my createTRPCProxyClient
definition in server.ts
. In the docs, they just pass the typeof createTRPCContext
as a generic in the initTRPC.context()
function, which was done in a separate file when the project was generated.
Does anyone know how I can get this to work?
0 Replies