What’s Next.js for Apollo

This year marked the beginning of a fundamental shift in the way I build applications. Thanks to GraphQL and a technique known as universal rendering (also known as isomorphic rendering), I’ve completely changed the way I interact with and render data inside my applications for the better.

This shift, however, was not without its challenges. When I first adopted GraphQL and universal rendering in my development practice, I found myself spending far more time setting up build processes than I was building actual applications. There were just so many added complexities I found myself having to deal with for the sake of performance.

I almost gave up until two open source projects, released within months of each other, were brought to my attention: Apollo and Next.

Apollo is a GraphQL client that’s concerned exclusively with the data layer of our application; it cares about efficiently fetching our data. Next, on the other hand, is a minimalistic framework for server-rendered React applications that’s concerned exclusively with the UI layer of our application; it cares about efficiently rendering our UI.

In this post, I’m going to attempt to cover the merits of using Apollo and Next independently, followed by the amazing performance and productivity gains they provide if used in tandem.

Read full article