Member-only story
GraphQL + NodeJS + MongoDB — 02 — Unit testing made easy with NestJS
This is a second part of my first article on how to work with GraphQL MongoDB and NodeJS in an easy way with the help of NestJS, when I will be focusing in unit.

Welcome back! This is a follow up from my previous article when I scaffolded a GraphQL with MongoDB in NestJS with a CRUD and cursor pagination set.
It is expected a basic knowledge of Javascript/Typescript to follow up this article, as well of some understanding of GraphQL and MongoDB that was already provided in my previous article that you can read here.
If you are arriving here first, don’t forget to check my previous article:
We are going to start from where stopped there, using the code from this branch link.
We already have a fully functional code that allows us to run all basic CRUD operations:
- Create: creates an user in our mongo database
- Read: to get user by Id or list users with cursor pagination
- Update: to update a…