API architecture
REST over HTTP suits public and partner APIs because it is cacheable, widely understood and easy to secure at a gateway. GraphQL suits clients with varied data needs over a connected domain, and gRPC suits internal service-to-service calls that need strict contracts, streaming and low overhead. Contracts are written first, in OpenAPI or Protocol Buffers, and breaking changes are detected in CI.
- REST with OpenAPI contracts
- GraphQL with persisted queries and complexity limits
- gRPC and Protocol Buffers
- API gateways and request routing
- Cursor-based pagination
- Additive versioning and deprecation policy
- Webhooks with signed payloads
