GraphQL concepts I wish someone explained to me a year ago [Series Update 2/2]

Naresh Bhatia
Naresh Bhatia
Published in
Sent as a

Newsletter

2 min readJan 7, 2019

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.

We ended up creating a pub/sub mechanism using Redis to distribute published messages over multiple servers. Here’s the architecture:

Lastly, we implemented matching subscriptions on our client to close the loop. With this, you should feel empowered to write your own GraphQL applications from scratch.

Miss any parts or want a refresher?

If you’re already caught up to this point…

And if you found this series helpful, please share it with your fellow developers.

Until then, happy computing!

-Naresh

--

--