Hacker News new | ask | show | jobs
by benatkin 1278 days ago
Why use GraphQL? There is tRPC now.
3 comments

tRPC is for a single team working on Typescript frontend to Typescript backend (that's niche). If you have native mobile clients (different lang) or different teams that need to agree on a contract (GraphQL schema), GraphQL is the recommendation, even from ardent tRPC supporters.
Yeah maybe. It's a leaky abstraction where the real magic happens in the RPCs in the "resolvers"
Gonna put this article I read earlier this week in here to answer your question: https://wundergraph.com/blog/trpc_vs_graphql
I use GraphQL because my clients are not all TypeScript based. Also I don't necessarily want to write my backend in TypeScript either. My stack is therefore Rust with GraphQL with clients in React for web and Flutter for mobile.