GraphQL APIs: REST in Peace
summary
Yelp replaces a three-endpoint, hundreds-of-fields API with a public GraphQL layer running on Python 3.6 and the graafian library on Pyramid, fronting a couple-hundred-service microservice backend. It solves the N+1 problem with per-request data loaders that batch many IDs (six business lookups become one bulk call), adds a Specter caching proxy that caches ID→value maps for bulk endpoints, enforces request budgets (example: 1000 ms) and node-based rate limiting plus middleware to cap resolver executions.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:42In the beginning
- 2:37Query The representation of data you want returned
- 3:38Our Setup
- 9:00The N+1 Problem
- 9:53Dataloaders!
- 12:23Considerations
- 14:35Service Caching
- 17:00Caching in Bulk
- 19:05Request Budgets
- 22:50GraphQL
- 23:45Node-based
- 24:33Field-based
- 25:33Securing the API
- 27:50Easy* failure handling and retries
related talks
38mBuilding mobile APIs with services at Yelp
31mGraphQL: how to make clients enjoy using your API
33mGraphQL Will Do To REST What JSON Did To XML
55mGraphQL - APIs the New Way
37mGraphQL — A New Look at the API
54mGraphQL — Usable API or Just Another Hype?
58mGraphQL + Python today: Implementing a Public API with GraphQL
22mWhy Migrate from REST to GraphQL?
