Last Minute Notes
  • Github
  • Docs
  • Learn
    @sayanstwt
Lessons
0/37 done
  • Queues & Streams
  • Real-Time Updates
  • REST, gRPC & GraphQL
  • Events & the Outbox
Learn/System Design/Communication

REST, gRPC & GraphQL

7 min Beginner 6 steps

Three ways to shape an API and when each one fits.

Styles
3
Differ in
round trips
And
payload shape
Mobile appAPIuser + posts + comments?
request reply failure
In this lessonStep 1 of 6
  1. The problem
  2. REST
  3. GraphQL
  4. gRPC
  5. Pagination
  6. Recap
Step 1 / 6problem

One screen, many shapes of data

A profile screen needs a user, their posts and the comments on one post.

The API style decides how many round trips it takes, how much data you download, and how well it caches.

Key idea

There is no best style. REST, GraphQL and gRPC trade simplicity, flexibility and speed.

←→ step·R replay·Space pause

You'll learn

  • REST round trips and over-fetching
  • How GraphQL lets the client pick fields
  • Where gRPC fits
  • Cursor vs offset pagination
Read the full notesHLD Building Blocks, 15