For about five years this was framed as a succession: GraphQL was going to replace REST the way REST replaced SOAP. That is not what happened. REST did not decline, GraphQL found a specific job it is very good at, and most teams that evaluated both ended up running each where it fits rather than picking a winner.
The Mechanical Difference
REST: many endpoints, each returning a fixed shape. /users/42 returns a user, /users/42/orders returns their orders.
GraphQL: one endpoint. The client sends a query naming the fields it wants, including nested ones, and gets back exactly that shape in a single response.
Everything else follows from this.
What GraphQL Actually Fixes
Over-fetching. A REST endpoint returns everything it returns. A mobile list view needing a name and an avatar still downloads the full user object, including the fields it will never display. On a slow connection with a metered data plan, this is a real cost rather than a theoretical one.
Under-fetching. The opposite, and worse. Rendering a screen needs a user, their last five orders, and each order's items — three or more round trips, each waiting on the one before. GraphQL expresses that as one query and one response.
These are genuine problems and GraphQL genuinely solves them. That is why it exists and why it persists.
What It Costs You
Caching. This is the big one. REST responses are plain GET requests with URLs, so browsers, proxies and CDNs cache them with no work from you. GraphQL queries are typically POSTs to a single URL with the query in the body, so none of that applies. You rebuild caching yourself, inside the application, and it is genuinely harder.
Expensive queries. A client that can compose its own query can compose an appallingly costly one. Nested relationships can fan out into thousands of database calls from one innocuous-looking request. You need depth limits, complexity scoring and timeouts before this is exposed to anyone you do not trust.
Rate limiting stops working. "100 requests per minute" is meaningless when one request can cost a thousand times another. You end up scoring queries by cost, which is a project in itself.
Server overhead. Parsing, validating and resolving a query is more work than serving a fixed route.
Observability. Every request is POST /graphql. Your logs, metrics and traces all need extra work before they can tell you which operation was slow.
Side by Side
| REST | GraphQL | |
|---|---|---|
| Endpoints | Many | One |
| Response shape | Fixed by server | Chosen by client |
| HTTP caching | Free | You build it |
| Nested data | Multiple round trips | One request |
| Over-fetching | Common | Avoided |
| Versioning | /v1, /v2 | Deprecate fields instead |
| Rate limiting | Count requests | Score query cost |
| Tooling assumptions | Universal | Needs GraphQL-aware tools |
| Learning curve | Minimal | Moderate, both ends |
The Same Request, Both Ways
Say a screen needs a user's name, and the titles of their last three orders.
REST — two requests, the second depending on the first:
GET /users/42
→ { "id": 42, "name": "Sana", "email": "...", "address": {...}, ... }
GET /users/42/orders?limit=3
→ [ { "id": 901, "title": "...", "total": ..., "items": [...] }, ... ]
You receive the email, the address and every order field, none of which the screen displays. And the second request cannot start until the first returns.
GraphQL — one request, exactly the fields asked for:
query {
user(id: 42) {
name
orders(last: 3) { title }
}
}
→ { "data": { "user": { "name": "Sana",
"orders": [ { "title": "..." }, { "title": "..." }, { "title": "..." } ] } } }
One round trip, no wasted bytes. On a phone on a weak connection, this is a visible difference in how quickly the screen fills.
Now the other side of it. The REST responses are GET requests with URLs, so a CDN can cache them and a repeat visitor may never reach your server. The GraphQL request is a POST to /graphql, so it reaches your server every time unless you have built caching yourself. Whether that trade is worth it depends entirely on your read patterns — which is why this is not a question with one answer.
What Teams Actually Do
The pattern that has settled is a split by audience rather than a choice:
- REST facing outward. Public and partner APIs, where caching, predictability and universal tooling matter and where you do not control the client.
- GraphQL facing inward. Your own web and mobile applications, where one screen assembles data from several services and the client team wants to iterate without waiting on a new endpoint.
- Something else between services. gRPC is common for internal service-to-service traffic where performance and strong typing matter more than human readability.
Adoption surveys differ considerably — published figures for GraphQL use range from roughly 30% to over 60% of organisations depending on the survey and what counts — but they agree on the shape: GraphQL grew and settled, REST never went anywhere.
A Rule You Can Apply
- Public API? REST. The caching and the tooling decide it.
- One client, simple screens? REST. GraphQL's benefits need complexity to pay for themselves.
- Several clients wanting different shapes of the same data? GraphQL. This is the case it was built for.
- Mobile app on poor connectivity? GraphQL, for the round trips and the payload size.
- Small team, tight deadline? REST. Fewer moving parts and nothing new to learn.
- Aggregating several internal services for one UI? GraphQL, which is what a gateway layer is for.
The Mistake Worth Avoiding
Adopting GraphQL for a single client with straightforward data. You take on the caching problem, the query-cost problem, the observability problem and a new library on both ends — in exchange for solving an over-fetching problem that was costing you a few kilobytes.
GraphQL earns its complexity when several clients need different views of connected data. With one client and flat data, REST is not the conservative option. It is the correct one.
Related reading: Next.js versus SvelteKit on the framework layer above this, PostgreSQL versus MySQL on the layer below, and the Model Context Protocol on how AI agents are now consuming APIs of both kinds.
Key Takeaways
- REST serves fixed shapes from many URLs; GraphQL serves client-chosen shapes from one.
- GraphQL solves over- and under-fetching, which are real problems on mobile.
- It costs you free HTTP caching, simple rate limiting and straightforward observability.
- Expensive nested queries are a security concern needing depth and complexity limits.
- Most teams run REST outward and GraphQL inward rather than choosing one.
- With one client and simple data, REST is the correct answer, not the timid one.
Written by the WritePures newsroom. Spotted something that needs updating? Tell our editors.
0 Comments
Join the conversation
Replying toNo comments yet. Be the first to share your thoughts.