Incrementally Adopting GraphQL and Relay at Pinterest
summary
Pinterest builds a Relay migration API with hooks like useMigrationFragment hook and useMigrationQuery hook plus an Auto Legacy translator that turns REST pin objects into GraphQL-shaped Relay types, letting components accept either source. Hundreds of components and a dozen features already migrate incrementally under AB tests across a half billion MAU app. The system caches translated objects for stable references, removes duplicated translators, and is about to be open sourced.
AI-written summary · about
chapters (14)
- 0:00The problem with legacy data
- 2:47Iterative migration attempts
- 8:16Developing a migration API
- 8:48Automating translation logic
- 11:54Implementing the migration API
- 14:20Bottom-up component migration
- 14:33Handling complex component trees
- 14:44Advanced fragment spreading
- 15:33Supporting multi-source inputs
- 17:32Migrating the root data layer
- 19:40Experimentation and roll-out
- 20:50Cleanup and technical debt
- 21:01Results and future outlook
- 24:37Closing thoughts and Q&A
related talks
28mMigrating Pinterest profiles to React
40mAdoption of GraphQL in Meta Ads Manager
31mFrom Relay to Apollo, a story of GraphQL clients
45mMigrating Pinterest profiles to React
32mReintroducing Relay
28mRelay: An Application Framework For React
33mUsing GraphQL and Relay for hybrid Ruby on Rails applications
14mWhy Relay is a Must for your GraphQL APIs
