Answer
REST: resource-oriented URLs, multiple endpoints, server shapes responses. Simple caching (URL = cache key), predictable, works well with CDNs.
GraphQL: single endpoint, client specifies fields in query. Reduces over/under-fetching, strong typing via schema, great for mobile/slow networks with varied data needs.
| REST | GraphQL | |
|---|---|---|
| Over-fetching | Common | Client picks fields |
| N+1 / multiple round trips | Multiple endpoints | Batched in one request |
| Caching | HTTP cache native | Needs normalized client cache (Apollo/Relay) |
| Versioning | /v2/users | Deprecate fields in schema |
| Complexity | Lower server | Resolver layer, query cost limits |