Clerk Context in TRPC

I used create t3 app to create an app and have added clerk according to their docs to the app. i tried adding it to the trpc context like the first picture attached and that worked great. i was able to create a protectedProcedure. But now i am getting an error in server.ts (/server/trpc/server.ts) that i cant call createTRPCContext because I only have the headers there (2nd picture attached). Please lmk if that is a noob question because it seems trivial but I somehow can't figure it out.
No description
Solution:
Hi @LukasGaeb , I too had struggle when using the latest T3 app with clerk and this is the current change that I have now and works perfectly fine.
Jump to solution
4 Replies
LukasGaeb
LukasGaeb3mo ago
sorry forgot to post the second pic
No description
Solution
Sugan_Selvam
Sugan_Selvam3mo ago
Hi @LukasGaeb , I too had struggle when using the latest T3 app with clerk and this is the current change that I have now and works perfectly fine.
LukasGaeb
LukasGaeb3mo ago
awesome thanks!