So the way that I resolved this issue was by just using the ConfigurableModuleBuilder
helper class. Basically I needed to create a wrapper around MongooseModule
and then pass the options from MongoModule
to it.
Here is how I did it: https://github.com/kasir-barati/bugs/blob/028caf4819903d71a79cf2495659604483617317/src/mongo/mongo.module.ts