aspizu
aspizu3mo ago

How does tRPC work?

I have a few quesstions regarding tRPC How does tRPC achieve type-safety without code-gen? Can tRPC work purely over websockets?
6 Replies
BeBoRE
BeBoRE3mo ago
By using validators like Zod. You can run everything over WebSockets.
Alex / KATT 🐱
Writing a tiny tRPC client | tRPC
Ever wondered how tRPC works? Maybe you want to start contributing to the project but you're frightened by the internals? The aim of this post is to familiarize you with the internals of tRPC by writing a minimal client that covers the big parts of how tRPC works.
aspizu
aspizu3mo ago
Thanks
aspizu
aspizu3mo ago
why does it not use body?
No description
aspizu
aspizu3mo ago
afaik GET can have a body Why are notifications opt-in?
More Posts
How to disable Next.js draftmode in tRPC?Hi guys, is it possible to disable the Next.js draft mode using tRPC? I am tryin to achieve somethiHandle Multipart form data.how to handle multipart form data using Trpc. I want to upload an image to a file storage service. Running Websockets/Subscriptions with Fetch / Edge Runtimes AdapterHi, has anyone been able to use trpc websockets/subscriptions? I am having challenges setting up theTRPClientError: Unexpected characterHello, I am working on an Expo app and I seemingly randomly get the error in the picture. I don't reChange db url in ctx with an API callI want to have a switch in my frontend to change from dev db to prod db. I'm using prisma. Have 2 prTRPC Docs GenerationHey, I want to generate a swagger-like interface to document my TRPC api. However, I don't want to uerror: NEXT_REDIRECTHi I'm doing a server call in RSC, but it crash the app and show this kind of error where shows in tIs there a way to use TRPC React Query Integration with Nanostores instead of the Context API?Currently we use TRPC by wrapping out application in a TRPC context provider. However, in some use cWhat do you guys think about the approach of importing/exporting tRPC types to be used in separate BHello, I was looking for a way to share tRPC API between multiple electron apps, I thought first abHow to add fallback link to tRPC link (Mirror API URL if main URL failed)My API URL is not functioning in Iran, I'm using Vercel and Vercel has banned Iran, I want to provid