← The field guide

SPECIMEN No. 015 Β· API doctrine

GraphQL

A query language that lets clients ask for exactly what they need, and lets the backend find out what that costs.

🌱 Mature
🏠 Habitat
One backend with four frontends
🦈 Natural predator
N+1 queries
πŸ€’ Common symptom
Let me check the resolver

βœ… GOOD FIT

  • One backend serving four or more different frontends
  • Agents and clients exploring a typed, introspectable API
  • Client teams blocked on bespoke endpoint requests

🚩 TOO FAR

  • One page load triggers four hundred database queries
  • Anyone with the schema can run arbitrary nested work
  • Debugging a slow page starts with finding the resolver

🎯 SWEET SPOT

Super Reasonable

Adopt it when several clients share one backend, with batched resolvers, depth and cost limits, and persisted queries for public traffic. With one frontend, plain HTTP endpoints and a typed client do the same job with less to debug.

IN THE WILD

No sighting yet

This species has been catalogued but not yet observed in a comic. It is on the backlog.