I\'m wondering if there is a way to insert new document and return it in one go.
This is what I\'m currently using:
db.collection(\'mycollection\').i
Posting this as this might be helpful for someone. You can find the updated object like this:
await req.db .collection('users') .insertOne({ email, password: hashedPassword, name }) .then(({ ops }) => ops[0]);