Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

REST, gRPC or GraphQL for a New Platform

An e-commerce company is splitting a monolith into services: Catalog, Inventory, Pricing, Cart, Checkout. Consumers are (a) a public partner API used by hundreds of third-party sellers, (b) an iOS/Android app whose product page composes data from Catalog + Inventory + Pricing + Reviews, and (c) the services calling each other at ~50k requests/s aggregate.

  1. Recommend a protocol for each of (a), (b), (c) and justify with concrete properties (payload, contract, tooling, caching, browser support).
  2. If you pick GraphQL for (b), describe the N+1 problem that a naive products { reviews { author { name } } } resolver causes and how DataLoader fixes it. Include rough query counts for 20 products with 10 reviews each.
  3. Name two other risks specific to GraphQL and one mitigation each.

Share this question

← Back to API Design & Service Communication practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.