GraphQL wins при diverse clients и graph-shaped data; loses на simple CRUD, file transfer и HTTP caching ubiquity.
Разбор
- GraphQL wins когда clients diverse, data graph-shaped — kills over-fetching и waterfalls, typed schema + introspection для tooling/codegen.
- When NOT: simple CRUD, file up/download, public API где HTTP caching matters — REST проще и cache-friendly. GraphQL для two-endpoint app — over-engineering.
- You inherit a server. Schema design, resolver performance (DataLoader), query-cost limits, client caching — ongoing work. Complexity moves client → system.
- Caching downgrade vs REST HTTP layer — rebuild client normalized cache, optionally edge persisted queries.
- Monitoring/rate-limiting harder — every call same POST; rate-limit by query complexity instead of per-endpoint.
Итог
GraphQL — когда many clients нужны different field subsets одного graph; REST default для CRUD и cacheable public APIs.