Comparison
tRPC vs REST vs GraphQL
Three API styles for TypeScript apps.
1 min readupdated 2026-07-04
/ quick answer
tRPC gives end-to-end types for TS-only stacks. REST is universal. GraphQL trades complexity for flexible clients. Three API styles for TypeScript apps.
Three API styles for TypeScript apps. tRPC gives end-to-end types for TS-only stacks. REST is universal. GraphQL trades complexity for flexible clients. Recommendation: tRPC for internal TS apps. REST for anything public. GraphQL only when client flexibility outweighs the schema tax. This comparison node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Overview
tRPC gives end-to-end types for TS-only stacks. REST is universal. GraphQL trades complexity for flexible clients.
Differences
| Dimension | Option A | Option B |
|---|---|---|
| Type safety | Best in TS (tRPC) | None built-in (REST) / Schema-driven (GraphQL) |
| Client diversity | TS only (tRPC) | Any (REST / GraphQL) |
| Complexity | Low (tRPC) | Low (REST) / High (GraphQL) |
Use Cases
- →Full TS monorepo → tRPC
- →Public API, many clients → REST
- →Flexible mobile + web clients → GraphQL
Recommendation
tRPC for internal TS apps. REST for anything public. GraphQL only when client flexibility outweighs the schema tax.
/ frequently asked
What is the difference in tRPC vs REST vs GraphQL?
tRPC gives end-to-end types for TS-only stacks. REST is universal. GraphQL trades complexity for flexible clients.
What are the main points of comparison?
Type safety: Best in TS (tRPC) vs None built-in (REST) / Schema-driven (GraphQL) · Client diversity: TS only (tRPC) vs Any (REST / GraphQL) · Complexity: Low (tRPC) vs Low (REST) / High (GraphQL)
Which one should I choose?
tRPC for internal TS apps. REST for anything public. GraphQL only when client flexibility outweighs the schema tax.
↳ connected nodes
Workflow↳ linked
Automated GitHub Issue Triage
Label, prioritize, and route incoming issues without a maintainer.
Prompt↳ linked
SQL Explainer Prompt
Explain a SQL query in plain English with data implications.
Prompt↳ linked
Error Diagnoser Prompt
Turn a stack trace + code into a ranked diagnosis with next steps.
Prompt↳ linked
Code Refactor Advisor Prompt
Get a ranked list of refactors before touching a file.
Prompt↳ linked
Test Case Generator Prompt
Generate meaningful test cases from a function signature.
Tool Stack↳ linked
Indie Hacker MVP Stack
Ship a monetizable web MVP in a weekend, alone.