API Design · Senior · Question 1 of 75
How do you choose between REST, GraphQL and gRPC for a new system?
- 1Always GraphQL, because it's newest
- ✓Correct answer: By consumers and constraints: REST for public, cacheable resource APIs; GraphQL for varied UI data needs; gRPC for internal low-latency service calls with typed contracts
- 3Always gRPC, because it's fastest
Explanation
Many systems mix them: gRPC between services, a GraphQL or REST BFF for clients, and REST for public partners.