REST strengths
- Simple mental model — resources and HTTP verbs.
- Native HTTP caching via GET + CDN.
- Universally understood — any client, any language, no special tooling.
- Lower operational overhead — no schema registry, no resolver complexity.
GraphQL strengths
- Client-specified queries — no over-fetching or under-fetching.
- Single endpoint, single round-trip for complex nested data.
- Strongly typed schema — auto-generated docs and IDE completion.
- Great for product APIs powering multiple clients (web, iOS, Android) with different data needs.
GraphQL tradeoffs
- N+1 query problem — naive resolvers execute one DB query per object. Requires DataLoader batching.
- Caching is harder — queries are POSTs; CDN caching requires persisted queries.
- Authorization complexity — field-level permissions are harder than endpoint-level.
Decision rule
Use REST for simple CRUD APIs, internal service-to-service communication, and teams without GraphQL experience. Use GraphQL when multiple clients with divergent data needs consume a product API and over-fetching is a real cost.