Frontend
Backend (Services)
REST
Server-Side-Rendering
Browser (TypeScript)
"Fields" query-params
/users/1?fields=name,age,avatar_urls[thumbnail]
=> Prevent over-/underfetching
Batched fetching of (sub-)entities
=> Prevent N+1 service-calls
Versioned API
=> Allows deprecation/breaking changes
Mismatch between expected json and "Fields" parameters
can cause problems
Batched fetching works, but is manual and annoying to maintain
(part of it over-engineered, part of it under-engineered)
Resilience is manual and inconsistent
Versioned API means the whole endpoint is duplicated even if
the actual difference is small (e.g. type of one field)
Frontend
Backend (Services)
REST
GraphQL
Server-Side-Rendering
Browser (TypeScript)
Building Blocks:
GraphQL is protocol-agnostic!