Engineering Decisions · Middle · Question 3 of 14
You're publishing an API for external partners who use many languages. Responses should work with CDNs, and a partner's first call should take minutes. Which style?
- 1gRPC with published
.protocontracts - 2GraphQL with one endpoint and a typed schema
- 3REST over HTTP with an OpenAPI description
Show the answer
Correct answer: REST over HTTP with an OpenAPI description
Explanation
REST needs nothing beyond an HTTP client, and GET responses work with CDNs out of the box. GraphQL fits clients with very different data needs, though caching usually takes more work because queries often go by POST. gRPC fits fast internal calls between services you control, but it needs generated clients and doesn't work directly from a browser.