INFO Technology RadarINFO Technology Radar

tRPC

This item was not updated in last three versions of the Radar. Should it have appeared in one of the more recent editions, there is a good chance it remains pertinent. However, if the item dates back further, its relevance may have diminished and our current evaluation could vary. Regrettably, our capacity to consistently revisit items from past Radar editions is limited.
Adopt

For internal frontend-backend communication we prefer tRPC because we think, especially in combination with Next.js, it is as a more efficient and more type-safe solution when compared to GraphQL.

For externally facing ('public') APIs where we are not in control of the clients using our API GraphQL or REST are viable alternatives.

Trial

We want to trial tRPC because we think, especially in combination with Next.js, it can serve as a more efficient and more type-safe way to implement APIs when compared to GraphQL

Assess

tRPC is a tool that provides type-safety between your front and back-ends, hence it makes it really easy to build scalable and robust backends quickly for Node based apps. Currently, the dominant way of making typesafe APIs is using GraphQL (it's awesome). Since GraphQL is a query language for APIs, it doesn't take full advantage of TypeScript, it comes with excess boilerplate code and requires a lot of initial setup. If you're already using TypeScript everywhere, you can share types directly between the client and the server without the need of any code generation.