Getting rid of the REST Migrations to GraphQL from REST
summary
Pinterest migrates 878 endpoints and 7,000+ fields for 450M+ users using Apollo Kotlin and a normalized cache to avoid a full REST-to-GraphQL model rewrite. A single build-time dictionary registers converters keyed by GraphQL __typename, hooks into cache write callbacks, and generates a combined god query per type so one converter maps GraphQL↔REST. Updates flow both ways by issuing node queries by ID, normalizing records, merging them, and converting back to legacy models.
AI-written summary · about
chapters (9)
- 0:00Introduction to migration
- 1:15GraphQL vs REST basics
- 3:21Pinterest's migration journey
- 5:26Client-side challenges
- 8:35Current architecture approach
- 10:02Normalized cache solution
- 12:06Converter implementation
- 13:30Reverse conversion process
- 15:15Next steps and Q&A
related talks
22mWhy Migrate from REST to GraphQL?
42mFrom REST to distributed GQL
18mIs GraphQL the end of RESTstyle APIs
45mMoving from REST API to GraphQL: Lessons from Real Projects
46mFrom REST to GraphQL: A 20-Minute Adventure
29mFrom REST to GraphQL
23mAugmenting a Legacy REST API with GraphQL
39mOur ongoing journey from REST to GraphQL on Android
