RailsConf 2019: New HotN+1ness - Hard lessons migrating from REST to GraphQL

RailsConf 2019: New HotN+1ness - Hard lessons migrating from REST to GraphQL

Our desire to use new tools and learn new technologies backfires when we don't take the time to fully understand them.

In 2018, we migrated from a REST API to GraphQL. Patterns were introduced, copied, pasted, and one day we woke up with queries taking 6s and page load times > 10s. Customers were complaining. How did we get here?

In this talk, we will discuss why we chose GraphQL, show practical examples of the mistakes we made in our implementation, and demonstrate how we eliminated all N+1 queries.

I'll answer the question, "if I knew then what I know now... Would I stick with a REST API?"

B23de1730d87b48b885501465cffa61c?s=128

Eric Allen

May 02, 2019
Tweet