GraphQL marketing makes it sound like REST is obsolete. REST traditionalists say GraphQL is overcomplicated. Both sides are wrong in interesting ways.
What REST Is Good At
- Simple CRUD APIs
- Caching with standard HTTP semantics
- Clear endpoints and predictable logs
- Easy tooling (curl, proxies, monitoring)
What GraphQL Is Good At
- Frontend teams needing flexible data shapes
- Avoiding over-fetching/under-fetching problems
- Aggregating data from multiple services cleanly
- Strong schema-driven development and documentation
The Hidden Costs of GraphQL
- Complex caching: HTTP caching doesn’t map cleanly to GraphQL queries
- N+1 problems: naive resolvers can explode into many DB calls
- Operational complexity: query cost analysis, depth limits, persisted queries
- Security: you must guard against expensive queries (DoS-like behavior)
Decision Framework
Choose REST if:
- You have a small team and simple data requirements
- You want predictable endpoints and easy caching
- Your clients are third parties that benefit from simple HTTP semantics
Choose GraphQL if:
- You have multiple clients (web, iOS, Android) with different needs
- Your data model is complex and clients need custom views
- You can invest in schema governance and resolver performance
Most teams should start with REST. When you feel the pain of maintaining many endpoints and versioning issues, GraphQL might be worth it. It’s an upgrade in flexibility, not a free lunch.
