REST's N Calls vs GraphQL's One
A resource-oriented REST API often needs multiple endpoints to render a single screen — user info, posts, comments, and like counts might each live behind a different route. Add REST's tendency to over-fetch unused fields, and the total data sent over the wire ends up far larger than what the screen actually displays.
This calculator multiplies your REST call count by the average response size per call to get a total REST payload, then compares it against the size of a single GraphQL query that fetches the same data in one round trip.
GraphQL isn't automatically the winner, though. More complex queries raise server-side resolver costs, and issues like the N+1 problem can introduce their own performance overhead. This tool compares pure data transfer only, so weigh server-side cost alongside these numbers before deciding to migrate.
Frequently Asked Questions
REST endpoints are organized around resources, so a screen that needs several kinds of data often has to request each resource from a separate endpoint.
It reduces over-fetching by letting clients request only the fields they need, but complex queries can raise server-side resolver costs, so it is not always the better choice.
Because REST responses have a fixed shape, they often include fields the screen doesn't actually need, which means unnecessary data gets sent over the network.