How the userId is added to the tRPC ctx in LobeChat source code?
In this article, we analyse how the currently logged-in userId is added to the tRPC ctx by reviewing LobeChat source code. I recommend reading this tRPC setup to relate to the concepts explained in this article.
But before that, I want to explain how...
thinkthroo.com3 min read