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
π Would reach for it
AlexThe ArchitectβFour clients, one schema: the contract is the documentation, and no bespoke endpoint drifts away.β
TaylorThe AI NativeβA typed, introspectable schema is the API her agents can explore and query without a human.β
HugoThe PerfectionistβDone properly, with batched resolvers and a typed schema, it is how the big companies do APIs.β
π Would push back
MorganThe Threat ModelerβA public endpoint that executes arbitrary nested queries executes arbitrary work, for anyone with the schema.β
RileyThe MinimalistβHTTP endpoints were fine; a resolver layer is one more thing to debug when a page is slow.β
RuthThe MaintainerβShe has seen the flexible query language before, and the N+1 queries that came with it.β
β 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.