A glimpse of GraphQL: Front end developers’ life is easy now!

By Navya Agarwal

Elevator Pitch

Aim is to instill within audience the feeling:”REST APIs are now #RestInPeace APIs Long live GraphQL” by showcasing a case-study.But the journey to GraphQL is not all sunshine & rainbows.The road has certainly been bumpy at times,but in the end we’re really able to recognize the benefits of GraphQL.

Description

In this talk we’ll walk through our journey to GraphQL at Adobe, and highlight a few of our successes and failures along the way.

Use Case: We at Adobe Experience Cloud, wanted to redefine our customer’s experience, and as part of this redesign we wanted to focus on surfacing more data (but not at the cost of a performance overhead). This new redesign now required a mix of data from different sources to be rendered on the screen and we began to face many problems around performance, documentation, and general ease-of-use. On many pages, we found ourselves making four or five round-trips to the server to fetch the data and nit picking it at the client side in order to render it.

Solving the problem with GraphQL: After some investigation, we thought of integrating GraphQL to our architecture— we decided to add a GraphQL proxy layer on top of our REST APIs. This was a pretty easy process- we built some utilities around making downstream REST calls to fetch data in our resolver, and wrote up some rules around converting our existing models into GraphQL and within a matter of days were ready to call our GraphQL pilot a success.

But the real challenges begin now: One of our REST API rolled back to a previous version and suddenly every GraphQL query started failing. And what about caching? The solution to these problems and others that came across as we switched to GraphQL are covered next.

Slides https://docs.google.com/presentation/d/1brXA6jXjGdjkg9chjYV2V8c5iaCu19lwF32uPLDXF9k/edit?usp=sharing Preview video https://youtu.be/TZiHAQyPhN8

Notes

I’ll start the talk by our motivation to switch to GraphQL and how it solved the two most important problems (multiple round trips to server and over fetching of gigantic data). But as we progressed on ur journey with GraphQL, we came across some unavoidable problems (from personal experience), the solution to which I will cover next. Then I will briefly explain the Apollo client and server wrapper around GraphQL and how to use it with React. While the road has certainly been bumpy at times, we’re really able to recognize the benefits that GraphQL provides.