GraphQL vs REST: why your team is fighting over the wrong implementation boils down to a familiar problem: architects debate access patterns while product teams quietly build around whichever API is easier to consume. That argument is usually waste. REST and GraphQL solve different client and service problems, and replacing one with the other does not automatically improve performance, reduce server load or eliminate coupling.
The useful question is not whether GraphQL beats REST. It is whether the pain your team has justifies another execution model, gateway, schema registry and set of operational rules. Sometimes it does. Often a modest REST cleanup or one BFF is cheaper, clearer and easier to support.
GraphQL gives clients a typed schema and lets them request the fields they need. That is excellent for applications with several view models, varied clients and complex screens. A dashboard can ask for user, account and case data without the API team pre-building every possible combination.
REST exposes resources and endpoints. That is less flexible, but the constraints are valuable. HTTP caching is already understood by CDNs, browsers and tooling. Each endpoint has an obvious URL, method, status code and payload. A team can inspect traffic with standard logs, publish an OpenAPI document and let client developers make ordinary HTTP requests.
The mistake is treating schema flexibility as the main business benefit. In many systems, the bottleneck is not an endpoint that returns too many fields. It is a database query with a missing index, an N+1 lookup hidden in application code, or a third-party API with no meaningful cache policy. GraphQL will happily expose all three. It will not fix them.
REST APIs become painful when one business object is assembled from several services and every client needs a bespoke endpoint for each screen. The result is the dreaded /dashboard-summary or /customer-profile-v2 route. Those endpoints are not really REST resources. They are server-side UI models exposed over HTTP.
A Backend for Frontend can solve that without introducing GraphQL. Each web or mobile client gets an API designed around its use cases. For a UK retailer, a customer-account BFF could combine order history, loyalty points and delivery status while keeping the underlying domain APIs resource-oriented. If there are only one or two clients, this may be all you need.
GraphQL becomes more compelling when the number of clients and combinations rises sharply. BBC-style public products may have web, mobile and partner experiences with overlapping but different data needs. GraphQL lets each client shape its request without creating a new backend endpoint for every layout change. The flexibility is real, but it moves complexity into resolver design, authorisation, observability and schema governance.
A single /graphql route can produce hundreds of distinct operations. Cache keys become operation-aware, query cost varies and errors occur at field level. Your CDN can no longer assume that one URL means one response. Teams need persisted queries, complexity limits, timeouts and field-level tracing before production traffic arrives.
REST can have those same problems when badly designed, but its primitives are standardised. You can set Cache-Control: public, max-age=60 on a stable endpoint. You can inspect one request with familiar tooling. You can add 429 Too Many Requests and retry with Retry-After. GraphQL does not remove these responsibilities; it adds a layer of query parsing and execution in front of them.
GraphQL reduces over-fetching and under-fetching, which can improve payload size. It does not automatically reduce total work. A client can request a shallow tree that triggers more joins and service calls than the original endpoint. Moving composition into a gateway may also add serialisation overhead and another network hop.
Measure the application, not the architectural label. Compare the same screen under both approaches: p50, p95 and p99 latency; database query count; payload bytes; downstream calls; error rate; and the time engineers spend adding a field. There is no universal benchmark that proves GraphQL is faster because the result depends on the schema, data model, resolver placement and network topology.
Guard against the obvious GraphQL failure mode with depth and complexity limits. Apollo Server exposes tooling for operation limits and persisted queries, but libraries differ, so configuration must follow the version you actually deploy. The policy matters more than the product name: reject unreasonable operations at the edge and record resolver timings in production.
const server = new ApolloServer({
typeDefs,
resolvers,
introspection: false,
plugins: [ApolloServerPluginLandingPageLocalDefault()]
});
await server.start();
const app = express();
app.use('/graphql', cors(), express.json(), server.expressMiddleware());
app.listen(4000, () => {
console.log('GraphQL ready at http://localhost:4000/graphql');
});
This is enough to run a GraphQL API locally, not enough to operate it safely. Production deployments still need authentication, persisted queries or another operation allow-list, resolver timeouts, tracing, dashboards and a deliberate caching strategy. Anyone presenting a schema and a server bootstrap as a finished platform is selling the easy part.
REST encourages authorisation to live near endpoints and resources. That can still be implemented badly, but the permission surface is easier to inventory. GraphQL makes access control granular because clients traverse nested fields. Protecting only the operation or the top-level query is not enough if one nested field exposes a different user's data.
Centralised field-level authorisation can help. It can also create a maze of policies that nobody understands. Whatever the transport, write tests for direct field access, nested access and repeated requests. For example, an NHS Digital service must never allow a signed-in clinician to retrieve records outside their care relationship. The correct API style cannot make that authorisation rule disappear.
REST may be a better choice when a service exposes a small, stable domain and a small number of trusted clients. GraphQL is usually stronger when several independently deployed clients need different slices of a rich domain and the organisation can support schema governance as a product. If that operational capability does not exist, adding GraphQL will not create it.
Stay with REST when your endpoints map cleanly to resources, clients benefit from CDN or browser caching, the API has one or two predictable consumers, or the team wants minimum operational overhead. Clean up over-fitted routes with commands, proper status codes, pagination and an OpenAPI contract. Add a BFF when the client needs composition.
Choose GraphQL when clients repeatedly need flexible field selection, several teams consume the same domain, under-fetching causes multiple round trips, and you can afford dedicated schema and platform ownership. Treat the schema as a public contract. Review it, version it and prevent breaking changes. Put resolvers close to the data where practical, because a resolver that calls another network service for every field can turn one request into dozens.
You may not need to choose exclusively. A large organisation can expose stable REST APIs between bounded contexts while using GraphQL as a composition layer for selected client experiences. That hybrid can work, but it needs explicit ownership. Otherwise you get duplicate business logic, inconsistent validation and two ways to interpret the same domain rule.
So stop holding meetings about which style is modern. Bring the actual incidents, payload measurements, cache hit rates and developer friction. The team is probably not fighting over REST or GraphQL. It is fighting over unclear ownership and an API that does not fit its clients.
How many distinct clients and view models need the same domain data? If the answer is one or two, start with well-designed REST and consider a BFF. If several clients repeatedly need different fields and shapes, prototype GraphQL with real client queries rather than a synthetic example.
Where does the latency actually come from? If the problem is over-fetching and round trips, GraphQL may help. If it is slow queries, blocked threads or fragile downstream services, fix the bottleneck before rewriting the interface.
Who will own schema governance and operation safety? GraphQL needs named owners for the schema, authorisation rules, complexity limits, persisted operations and resolver observability. Without those owners, REST with boring, explicit contracts will win.