With GraphQL Modules and dependency injection it's much easier to test your modules.
So let's start with a basic module definition:
You can mock providers by overwriting the existing provider definitions:
If you don't use DI, you can mock your context or resolvers like below:
For authentication (a common use case for mocking the context), if
AuthModule and you want to mock the logged in user during tests to have an admin role, you can do this in
afterAll, or when you're done with the mock, run