How to build an Apollo GraphQL server with TypeScript and Webpack Hot Module Replacement

Derek Fong
We’ve moved to freeCodeCamp.org/news
10 min readJan 2, 2019

--

Apollo Saturn V (Image Source: WallHere)

UPDATE 14 May 2019: Updated sample codes to fix breaking changes caused by `clean-webpack-plugin`. Also added a CodeSandbox live demo at the end of this post.

This post is part 1 of the Apollo GrpahQL: How-to series:

Let’s build an Apollo GraphQL Server with TypeScript and Webpack HMR!

Prerequisites 🕺

  • Node.js with NPM installed on your computer. At the time of writing, Node.js version 6 or above is required by Apollo Server.
  • Preferably basic understanding of the fundamental GraphQL principles.
  • Preferably general knowledge with TypeScript. That being said, general JavaScript knowledge should be sufficient to understand the topics covered in this post. I will try my best to explain when it comes to TypeScript-specific concepts.

Ready to Build Something? 🔨

First Things First ☝🏻

--

--