The Short Answer
Should I use REST, GraphQL or gRPC?
Use REST for public APIs and most integrations: it is simple, cacheable and understood by every developer. Use GraphQL when varied clients, especially front ends, need to fetch different shapes of related data efficiently. Use gRPC for fast communication between your own internal services, where performance and strict contracts matter more than browser support.
Read the transcript
Three API styles. Each one is somebody’s favourite. But they solve different problems. REST puts resources at web addresses, and uses standard HTTP. Every developer knows it. GraphQL has one endpoint. The client asks for exactly the fields it wants. gRPC calls functions on another server, using compact binary messages. It is very fast. So which one should you use? Use REST for public APIs and most integrations. Use GraphQL when many different screens need different shapes of data. Use gRPC between your own internal services. For a small team, REST alone is usually enough, until a real problem says otherwise. Start with REST. Add another style when you can name the problem it solves. The full guide is free at loomstrat.com.
What Each One Is
| Style | Origin | How it works |
|---|---|---|
| REST | Described by Roy Fielding in his 2000 doctoral dissertation | Resources at URLs, acted on with HTTP methods such as GET, POST, PUT and DELETE, usually returning JSON |
| GraphQL | Developed at Facebook from 2012 and released publicly in 2015 | One endpoint; the client sends a query describing exactly the fields it wants |
| gRPC | Released by Google as open source in 2015 | Calls remote functions defined in a schema, using HTTP/2 and compact Protocol Buffers messages |
References: Fielding’s dissertation, GraphQL documentation, gRPC introduction.
How They Compare
| REST | GraphQL | gRPC | |
|---|---|---|---|
| Data fetching | Fixed responses per endpoint; may need several calls | Client asks for exactly what it needs in one call | Fixed messages per method |
| Contract | Optional, commonly OpenAPI | Required schema | Required Protocol Buffers schema |
| Performance | Good | Good; can be expensive for complex queries | Very fast; compact binary format |
| HTTP caching | Works naturally | Harder; usually needs client-side caching | Not applicable in the usual way |
| Browser support | Native | Native | Needs a proxy layer such as gRPC-Web |
| Streaming | Limited | Subscriptions | Built in, both directions |
| Learning curve | Lowest | Moderate | Moderate |
| Tooling for partners | Universal | Good | Good, but less familiar to outside developers |
When REST Is Right
- Public and partner APIs. Every developer and integration tool understands it. Document it with an OpenAPI description.
- Simple create, read, update and delete operations.
- Caching matters. Standard HTTP caching and content delivery networks work out of the box.
- Webhooks and integrations. Most third-party platforms speak REST; see webhooks.
When GraphQL Is Right
- Many different clients. A web app, mobile app and partner each need different fields from the same data.
- Deeply related data. An order with its customer, items and shipments in one request instead of four.
- Fast-moving front ends. Front-end developers can change what they fetch without waiting for new endpoints.
Watch for: expensive queries that ask for too much, which need depth and cost limits; authorisation on every field; and caching, which takes more thought than with REST.
When gRPC Is Right
- Internal service-to-service calls, especially in a microservices system.
- High volume and low latency, where compact messages and HTTP/2 make a measurable difference.
- Streaming, such as live updates in both directions.
- Many languages, with client code generated from one schema.
Mixing Styles
Many systems use more than one: gRPC between internal services, REST for the public API, and sometimes GraphQL as a layer for the front end. That is reasonable, but each style adds tooling and knowledge to maintain. A small team is usually best served by REST alone until a specific problem justifies another.
Whatever you choose, plan how the API will change without breaking clients; see API versioning.
Frequently Asked Questions
Is GraphQL replacing REST?
No. GraphQL solves specific problems well, but REST remains the most common style, especially for public APIs.
Is gRPC faster than REST?
Usually, because it uses a compact binary format over HTTP/2. The difference matters most for high-volume internal traffic.
Can browsers call gRPC directly?
Not natively. A proxy layer such as gRPC-Web is needed.
Which is best for a mobile app?
REST or GraphQL. GraphQL helps when screens need varied combinations of data and you want fewer requests.
What is OpenAPI?
A standard format for describing REST APIs, used to generate documentation, client code and tests.