A REST API is one way to expose a public contract over HTTP. Its predictable endpoints can use standard HTTP semantics and caching, making it a practical choice for public-facing services. section 6.4 section 6.4.3
Weigh the benefits against the cost of multiple requests:
- For external partners, familiar HTTP semantics can make an API easier to adopt, while HTTP caching can reduce server load. section 6.4.3
- When a client needs related data from several endpoints, REST may require multiple round-trips; GraphQL can request that data together. section 6.4.3
A public partner API
A grocery-store partner needs to sync chip inventory. The decision is to use a RESTful API at Level 2 maturity, using verbs, because partners can rely on standard HTTP semantics and caching. section 6.4.3
Figure 6.7 REST is far more “chatty”, needing multiple roundtrips, while GraphQL only needs a single roundtrip!

Compare the multiple REST round-trips with GraphQL’s single request for the warehouse scanner. section 6.4.3



