How to build an Apollo GraphQL server with TypeScript and Webpack Hot Module Replacement
Published in
10 min readJan 2, 2019
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:
- Part 1: How to build an Apollo GraphQL server with TypeScript and Webpack Hot Module Replacement
- Part 2: How to Integrate an Apollo GraphQL Server with MongoDB and TypeScript Code Generator
- …and more coming soon!
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.