Communication · Intermediate · 9 min

REST, RPC & GraphQL

Compare resource APIs, RPC operations and graph queries against concrete client needs.

STEP 1 / 10
Define a shared contract — isometric concept diagramAn API is an interaction agreement. Components: 1. Mobile client. Representative clients, not a literal user count; 2. API boundary. Logical component or processing boundary. Connections: 1. Mobile client to API boundary: Define a shared contract; 2. API boundary to Mobile client: Reply: API boundary. Illustrations are conceptual, not deployed capacity or user counts.Mobile client → API boundary: Define a shared contract1API boundary → Mobile client: Reply: API boundary2Mobile client: Representative clients, not a literal user count1Mobile clientRepresentative clients, not aliteral user countAPI boundary: Logical component or processing boundary2API boundaryLogical component or processingboundary
1Mobile client2API boundary
  1. 1Mobile client → API boundaryRequestDefine a shared contract
  2. 2API boundary → Mobile clientReplyReply: API boundary

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Mobile client + API boundary highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • Resource naming does not replace an operation contract.
  • Procedure and query flexibility come with different operational obligations.
  • Validate and authorize the actual operation at the boundary.

PUT THE IDEA TO WORK

From learning to practice

No related challenges are currently available. Browse practice

RELATED PATTERNS

Client–Server ↗

Further reading

GraphQL · Authorization ↗

MDN · HTTP methods ↗