Quick and dirty replacement for mongoose-deep-populate plugin that is not maintained anymore. Uses the multiple level population introduced in Mongoose > 4 (?).
mongoose.plugin(require('mongoose-deep-populate'))
MySchema.find({}).deepPopulate("foo.bar baz")
const doc = await MySchema.findOne({});
await doc.deepPopulate("foo.bar baz").execPopulate();