News for hackers. Stuff that matters.
Re:Full-Stack TypeScript with tRPC and React by noughtme on Tuesday March 14, 2023 @03:08PM (#35156865)
Hmmm... interesting. Was this intended for public APIs? I think the whole point of tRPC is to reduce the overhead down to zero, since this is only for internal APIs.
Re:Full-Stack TypeScript with tRPC and React by ushakov on Tuesday March 14, 2023 @03:19PM (#35156985)
Yes!

tRPC is a great choice if you want to call server functions from the client without overhead in a type-safe way. However, with React Server Components, I doubt you will need tRPC for this use-case anymore

Our concept was: take the amazing developer experience and end-to-end type-safety of tRPC but give you an actual, spec-compatible GraphQL API, that you can expose and others can use and that also works with existing GraphQL tools

This is how Garph was born!