REST vs GraphQL vs tRPC for Founders | Coding Capybaras
REST vs GraphQL vs tRPC, explained for non-technical founders: what each one does, why REST is usually right for a first SaaS, and when the others earn their keep.
· Justin Boggs

Photo by Albert Stoynov on Unsplash
For a first SaaS built by a non-technical founder, REST is almost always the right way for your app to talk to itself. It is the default your AI assistant reaches for, the pattern with the most training data behind it, and the one you can debug by pasting a URL into a browser. GraphQL and tRPC are both good tools that solve real problems — but they solve problems you probably don't have yet on day one. This post explains what each of the three actually is, in plain English, and gives you a decision you can defend six months from now when the app is bigger.
TL;DR
- REST is the boring, universal default. Pick it for your first SaaS. Your AI assistant writes it fluently, every tool understands it, and you can inspect it in a browser.
- GraphQL lets the frontend ask for exactly the data it wants in one request. Worth it when you have many screens with wildly different data needs — not before.
- tRPC gives you end-to-end type safety in an all-TypeScript app with no code generation, which is genuinely useful for catching AI mistakes early — but it locks your API to a TypeScript client.
- The honest answer for most founders: start with REST, add the others only when a specific pain shows up.
What "how your app talks to itself" actually means
Your SaaS is really two programs. There is a frontend — the pages a user clicks around in, running in their browser. And there is a backend — the code on a server that reads and writes your database, charges cards, and sends email. Those two halves have to talk. When a user loads their dashboard, the frontend asks the backend "give me this person's projects," and the backend answers.
An API is the contract for that conversation. It defines what questions the frontend is allowed to ask, what shape the answers come back in, and how errors are reported. REST, GraphQL, and tRPC are three different styles for writing that contract. They are not databases, not frameworks, and not competing with Next.js or Supabase — they sit on top of all of that and govern the frontend-to-backend chatter.
Here is why this matters to you even if you never write the code yourself. The API style shapes how your AI assistant generates code, how easy the app is to debug when something breaks, and how much "type plumbing" you carry forever. Choosing well early is like choosing boring, proven tech: it removes a whole category of future headaches. Choosing badly means you and your AI assistant fight the framework on every feature.
One reassuring thing before we go deeper: this is a decision you can change later, at a cost, and it rarely becomes a crisis. Unlike your database schema, which is painful to unwind twelve months in, swapping an API style is contained work. So the goal here is not to agonize. It is to pick the option that keeps you and your AI moving fast today.
REST: the universal default
REST is a style where each piece of data lives at its own URL, and you act on it with standard web verbs. You ask for a user's projects with a request to /api/projects. You create one by sending data to that same URL with a different verb (POST instead of GET). You update project 42 at /api/projects/42. It reuses the plumbing the web already runs on, which is why it feels invisible once you've seen it.
REST wins for a first SaaS for reasons that have nothing to do with it being the "best" technology and everything to do with it being the most supported:
- Your AI assistant writes it in its sleep. REST has more public examples than any other API style, so a model generating a REST endpoint is on very well-trodden ground. Fewer hallucinated method names, fewer invented imports. That matters a lot when you are reading AI output you can't fully write yourself.
- You can debug it in a browser. A
GETendpoint is just a URL. Paste it in the address bar, see the JSON. When a customer reports a bug, that inspectability is worth its weight in gold. - Every tool speaks it. Stripe, Supabase, Resend, and basically every service you'll integrate exposes a REST API. Webhooks are REST. Your mental model transfers everywhere.
The knock on REST is real but overstated for small apps. Because each URL returns a fixed shape, the frontend sometimes gets more data than it needs (over-fetching) or has to make several calls to assemble one screen (under-fetching). At Google-scale, with hundreds of screens, that inefficiency adds up. On a SaaS with a dozen screens and a few hundred users, it is a rounding error. The Next.js + Supabase + Stripe stack most founders start on handles REST endpoints as "route handlers" with zero extra setup, which is another point in its favor: less to configure, less to break.
If you are shipping your first product, you can stop reading here and choose REST with confidence. The rest of this post is about knowing when the other two are worth the added complexity — which is a question worth being able to answer, even if the answer today is "not yet."
GraphQL: one request, exactly the data you asked for
GraphQL is a query language for your API: the frontend describes precisely the fields it wants, and the backend returns exactly that, no more and no less, in a single request. Instead of three REST calls to build a dashboard — user, projects, recent activity — the frontend sends one GraphQL query naming all three, and gets one response shaped to fit.
That is a genuinely elegant fix for the over-fetching and under-fetching problem. According to SD Times' rundown of the three styles, GraphQL shines when a complex frontend needs flexible, varied slices of data or has to stitch together several backend sources. If you are building something like a project-management tool with many views that each want different combinations of the same underlying data, GraphQL can meaningfully cut the number of round trips and let frontend and backend teams move independently.
The catch is the tax you pay for that flexibility, and it is not small for a solo founder:
- Setup and infrastructure. You define a schema, run a GraphQL server, and — to be type-safe on the frontend — run a code-generation step (
graphql-codegen) that turns your schema into TypeScript types every time it changes. - New failure modes. Because clients can ask for anything, a careless or malicious query can ask for too much. Production GraphQL needs query-depth limits, complexity analysis, and often persisted queries to stay safe. That is real security work you now own.
- Harder to eyeball. You can't paste a GraphQL query into a browser bar the way you can a REST URL. Debugging needs its own tooling.
None of that is a reason GraphQL is bad. It is a reason GraphQL is overkill for a first SaaS. The honest read from the community is that GraphQL's enterprise adoption has cooled from its peak as teams discovered that "infrastructure tax," and it now concentrates where the data-fetching complexity actually justifies it. For a founder wiring up a handful of screens with an AI assistant, that tax buys you very little and costs you a lot of weekends.
tRPC: type safety without the ceremony
tRPC lets you call your backend functions from your frontend as if they were local, with full TypeScript types flowing across the boundary — and, crucially, no code-generation step. You write a function on the server; you call it on the client; TypeScript knows the exact inputs and outputs on both sides automatically. The official tRPC docs put the pitch bluntly: "build & consume fully typesafe APIs without schemas or code generation."
For a non-technical founder, the appeal is specific and worth understanding. When your AI assistant changes a backend function — say it renames a field from title to name — a tRPC setup makes the frontend stop compiling immediately, with a red squiggle pointing at the exact broken line. The mistake is caught at build time, in your editor, before it ever reaches a user. That is the same safety-net argument for using TypeScript at all when you don't write it yourself, extended across the whole frontend-backend boundary. The community comparisons back this up: tRPC delivers this end-to-end safety with a tiny client footprint and, per the DEV Community breakdown of the three, without the schema-and-codegen dance GraphQL requires.
So why isn't tRPC the automatic answer? Two real constraints:
- It only talks to TypeScript. tRPC's magic comes from sharing types directly between a TypeScript client and a TypeScript server. The moment you need a public API that a customer's Python script or a third-party service can call, tRPC can't do it — you'd expose REST for that anyway.
- It's a tighter coupling. Frontend and backend become one TypeScript world. That's a feature for a solo founder shipping both halves, and a limitation the day you want them to evolve separately or expose the API externally.
tRPC is the strongest "second choice" on this list for the exact person this blog is written for: a solo founder building an all-TypeScript SaaS on Next.js who is not exposing a public API. If that's you, tRPC is a legitimate day-one option. If there's any chance you'll need an API that non-TypeScript clients call, start with REST and reach for tRPC only inside the app.
The honest comparison
Here is the whole decision in one table. Read the "best for" row first — that's the one that decides it for most founders.
| Consideration | REST | GraphQL | tRPC | | --- | --- | --- | --- | | What it is | Data at URLs, standard web verbs | Query language; ask for exact fields | Call server functions as if local | | Type safety | Manual, or add OpenAPI + codegen | Requires schema + code generation | End-to-end, no code generation | | Setup cost for a solo founder | Lowest — built into Next.js routes | Highest — server, schema, codegen, guardrails | Low — but couples client to server | | Debuggable in a browser | Yes (GET endpoints are just URLs) | No | No | | Works with non-TypeScript clients | Yes | Yes | No | | How well AI assistants handle it | Best — most training data | Good | Good, and improving | | Best for | Your first SaaS; any public API | Complex frontends, many data shapes | All-TypeScript app, no public API |
The pattern under the table: REST optimizes for universal compatibility and inspectability. GraphQL optimizes for frontend data flexibility. tRPC optimizes for developer experience inside a single TypeScript codebase. None is "modern" versus "legacy" — REST is still the backbone of the web in 2026, and the mature move is often to combine styles: REST for the public edges of your app, something type-safe for the internal chatter. But that's an optimization for later. Day one, one clean style beats a clever mix you have to maintain.
If you want the meta-lesson, it's the same one behind why proven, boring tech wins for solo founders: the best technical choice is usually the one with the fewest moving parts and the largest community, not the one with the most impressive feature list.
A decision tree you can actually use
When a real feature forces the question, walk this path:
flowchart TD
A[Do you need a public API<br/>non-TypeScript clients call?] -->|Yes| B[Use REST]
A -->|No| C[Is your whole app TypeScript<br/>frontend and backend?]
C -->|No| B
C -->|Yes| D[Are you fighting real<br/>over-fetching across many<br/>complex screens?]
D -->|Yes| E[Consider GraphQL<br/>internally]
D -->|No| F[Use REST now;<br/>tRPC is a fine upgrade<br/>for internal type safety]
Notice where every path that isn't a hard edge case lands: on REST, or on "REST now, tRPC later." That's not laziness. It's that the conditions that justify GraphQL — many screens, fluid data needs, multiple backend sources — are conditions of a product that has already found traction. You get to defer that decision until you've earned it, which is exactly the kind of decision you want to defer as a first-time founder with limited time.
Frequently asked questions
Do I have to choose just one API style?
No. Mature apps commonly use more than one — REST for anything external and a type-safe layer like tRPC for internal frontend-backend calls. But for a first SaaS, one style is simpler to build, debug, and hand to your AI assistant. Add a second only when a specific need appears.
Which API style do AI coding tools handle best?
REST, by a clear margin, because it has the most public examples for a model to have learned from. GraphQL and tRPC are both handled well too. The practical implication: when you're generating code with an AI assistant and want the fewest surprises, REST gives it the most solid ground to stand on.
Is GraphQL dead in 2026?
No, but its hype has cooled. GraphQL is still a strong fit for products with genuinely complex, varied frontend data needs. What changed is that teams learned the operational cost — query limits, complexity analysis, code generation — is real, so it's now used where it's justified rather than by default. For most indie SaaS, that justification hasn't arrived.
Is tRPC a replacement for REST?
Not exactly — it's a replacement for the internal calls between your own TypeScript frontend and backend. It can't serve a public API that non-TypeScript clients hit, so even a tRPC-heavy app usually keeps some REST at its edges. Think of tRPC as an internal upgrade, not a wholesale swap.
What does Coding Capybaras use?
The boilerplate uses REST-style Next.js route handlers, because that's the choice with the least setup, the best AI support, and the broadest compatibility for the non-technical founders it's built for. It's the same reasoning as the rest of the stack decisions: pick the option that keeps a solo builder moving.
When should I revisit this decision?
Revisit when a concrete pain shows up: you're making four calls to render one screen, or your AI assistant keeps breaking the frontend when it edits the backend, or a customer asks for API access. Let the pain pick the tool. Don't adopt GraphQL or tRPC preemptively for a problem you don't have.
The bottom line
REST vs GraphQL vs tRPC feels like a big architectural fork, but for a first SaaS it mostly isn't: pick REST, ship your product, and let a real, specific pain tell you when to reach for the others. GraphQL earns its complexity when your frontend's data needs get genuinely tangled. tRPC earns its coupling when you're all-in on TypeScript and want your AI's backend edits to surface as frontend errors instantly. Both are good tools waiting for the right problem — and you'll know that problem when you see it.
If you're building a SaaS with AI coding tools and want the API decision already made for you, Coding Capybaras is the free boilerplate I built for exactly this workflow — REST route handlers, wired into Next.js, Supabase, and Stripe, ready for your AI assistant to extend.