Happy new year everyone! We’re already in 2019 and I’m excited by all of you looking to learn GraphQL this year. Now that I finished writing this series, I thought I’d check in with you–have any questions or comments?

Before we close the books on this one, let’s take a quick recap of the last few parts I published…

Finishing implementing mutations and adding subscriptions

In part 5, we implemented mutations on our client to help us in our whimsical mission–creating some authors and publishing books out of thin air for our bookstore example.

From there, we started with the real fun stuff in parts 6 and 7–subscriptions. We used them to display changes to our bookstore in real time. On the server, we replaced Apollo PubSub, because the default implementation doesn’t scale. There are more robust implementations, however, many are not documented well. …


Part 7: Subscriptions (client implementation)

Image for post
Image based on Rostyslav’s pen

In part 6 of this series we implemented subscriptions on the Bookstore server. In this last and final part, we jump back to the client and implement matching subscriptions there.

Source Code

You can download the code for this part by executing the following commands. Skip the first command if you have already cloned the repository.

git clone https://github.com/nareshbhatia/graphql-bookstore.git
cd graphql-bookstore
git checkout master

Test Drive

Before diving into the implementation, let’s look at how the final implementation works. Make sure you have yarn installed on your machine. Now execute the following…

About

Naresh Bhatia

Front-end technologist and musician

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store