What this thread does
Choose tRPC for an owned TypeScript client and server, REST with OpenAPI for external consumers, and GraphQL for independently evolving clients with different nested reads.
Do first: create api-boundary.md in a disposable branch. List every consumer, its language, who releases it, and how long old clients remain active. Implement one paginated read, one authenticated write and one permission failure in a disposable branch. Try a backend change against the old client. Prefer the simplest option that passes those checks; team size alone does not decide the contract.
The problem
A TypeScript backend does not mean every consumer is TypeScript. A web app and React Native client under one team differ from a native mobile app, a partner integration or multiple autonomous teams. The recommendations below are editorial judgments from the documented tradeoffs, not measured performance rankings.
Versions, licences and cost — October 2026 references; tRPC release checked 2026-11-24
| Option | Status and licence | Cost and limit facts |
|---|---|---|
| REST + OpenAPI | REST is an architectural style, not an installable release. OpenAPI describes HTTP APIs; the server and client generator have their own versions and licences. | No single REST hosting price or request quota exists. Budget for your selected server, hosting and contract tooling; this is not a hosted plan. |
| tRPC | October 2026 reference 11.19.0; as of November 2026, latest stable 11.31.0 (checked 2026-11-24); MIT. | A library you host, not a metered API service. Hosting remains your expense; its type inference does not set a vendor request allowance. |
| GraphQL | A query language and execution model; choose and license a server implementation separately. No server package is selected here. | No universal hosted price or request allowance. Query depth, breadth and complexity need application controls; a request count alone does not bound work. |
The OpenAPI Initiative introduction explains machine-readable HTTP contracts. The tRPC introduction documents type inference without code generation and mounting alongside REST. GraphQL's learning guide describes schemas, selected fields and resolvers; its security guide covers demand controls. Hosting costs are implementation choices, not quotations for a deployment.
When to pick which
| Option and purpose | When it wins | When it loses | Honest pick line |
|---|---|---|---|
| REST + OpenAPI — explicit HTTP contract for resources and operations | Partners, mixed languages, independently released mobile clients, straightforward resource reads and writes | You must maintain a contract and client generation workflow; many screen-specific nested reads can multiply endpoints | Pick this if consumers must use your API without sharing TypeScript server types. |
| tRPC — typed procedure calls across an owned TypeScript boundary | Shared types and coordinated development; small team shipping web and TypeScript mobile together | External consumers need extra contract work; distributing router types across teams adds coordination | Pick this if you own both ends and can distribute compatible router types. |
| GraphQL — schema with client-selected nested fields | Several clients need different slices of connected data and a team owns schema governance | Simple CRUD gains little from resolver and query-control work; permissive queries can be costly | Pick this if differing client reads justify operating a queryable graph. |
These fit judgments follow the linked docs. tRPC is designed for TypeScript monorepos; it does not require every consumer to be in the same repository. GraphQL can use both GET and POST under its HTTP guidance; do not base this decision on the claim that every GraphQL request must be POST.
Recommendation by constraint
- Solo developer, private all-TypeScript app — default to tRPC. If partner or native-language clients are already planned, default to REST + OpenAPI instead.
- Small team, web plus TypeScript mobile owned together — tRPC; include an old-client compatibility check before each release. For a public product API, REST + OpenAPI is the default.
- Enterprise with many language stacks and independent releases — REST + OpenAPI by default. Choose GraphQL when multiple clients need materially different nested reads and a named team can own schema review and query budgets. Enterprise size is not itself a reason for GraphQL.
- Mixed product — keeping tRPC internal and an explicit REST boundary for partners is reasonable; both should call the same business logic so authorization does not diverge.
Community evidence
- bbuck, discussion #4697, 2024-06-19 — “Just straight up HTTP calls.” Their C# consumer called tRPC over HTTP and they described it as awkward but workable. This is one team's workaround, not proof that cross-language clients are impossible.
- KATT, discussion #1860, 2023-02-06 — “You're better off with GraphQL or OpenAPI if that is a requirement”. The maintainer was addressing organizational barriers to sharing server code/types. This is maintainer guidance, not an independent production comparison.
Prompt for the agent
Our consumers are <languages>, owned by <teams>, released <together or independently>, with old clients supported for <period>. Compare REST + OpenAPI, tRPC and GraphQL for one paginated read and one authorized write. Show contract distribution, runtime validation, authorization and an old-client compatibility check. Recommend one and state what requirement would reverse it. Use current stable dependencies; do not change the production API.
Mistakes to avoid
- Treating inferred TypeScript types as runtime validation or authorization.
- Changing a server return type and assuming already-installed mobile clients update with it.
- Selecting GraphQL only to avoid writing endpoints, without assigning query-cost and schema ownership.
- Treating tRPC as inaccessible over HTTP to other languages; the friction is tooling and contract ergonomics.
Limits
No implementations, compatibility tests or load tests were run. The community examples are older and tRPC-focused; they do not establish comparative failure rates. No REST server, GraphQL server, hosted schema registry or client generator was evaluated. Workload-specific latency, staffing cost and deployment pricing remain unmeasured.
Started from a post by @WhatWorks editorial comparison, packaged by the editor. Original post