-

Amsterdam, Netherlands
Back to Schedule

Mauricio Montalvo

Relay Migration API at Pinterest

Grote Zaal
GraphQL in ProductionCase studies

Session description

Pinterest is adopting GraphQL. Given our app's size, we can't simply rewrite everything in one fell swoop. So, we created the Relay Migration API (RMA) — a set of tools to incrementally migrate your React components to consume GraphQL-shaped data while making requests to REST endpoints. I'll share how we've significantly evolved the RMA after migrating four key surfaces, focusing on the advanced challenges we faced: RMA recreates objects on every render by default, breaking components expecting stable references. We implemented a caching layer, similar to Relay's, to return consistent objects between renders. RMA originally read from static source objects, creating stale data when Redux state changed. Our solution: a selective subscription system that re-computes GraphQL data only when source fields change, keeping data current while eliminating unnecessary renders. And in cases where Redux and GraphQL schemas fundamentally differ, we built bidirectional mapping with schema validation to ensure data consistency. Join us to learn how the Relay migration API has evolved and how it helps you accelerate your GraphQL migrations without disrupting existing applications!


Session speakers

Mauricio Montalvo

Pinterest, Senior Software Engineer

Case studiesreturning speaker

I’m a software engineer with 11 years of professional experience, I consider myself full stack but my career has been focused in FE development in the last years, I love creating UIs using ReactJS and GraphQL. At Pinterest, I’m part of the Web team that’s exploring the introduction of GraphQL in our systems, I’ve worked on this for 2 years now, leading a GQL migration project since Q3 2023. I think helping others and sharing knowledge is one of the best ways to improve in your career as a dev.

Get your ticket

Join three transformative days of expert insights and innovation to shape the next decade of APIs!

Get tickets
COMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIESCOMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIES
OPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITYOPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITY
BEST PRACTICESWORKSHOPSSCHEMASSECURITYBEST PRACTICESWORKSHOPSSCHEMASSECURITY