[SOLVED] Aggregate with Async/Await Migration

Is there a plan to update this package to work with async await ?

Something like this :

const res = await Coll.aggregateAsync()

Thanks a lot.

1 Like

Taking a look at the code, this package looks like a wrapper around rawCollection so you should be able to use that directly instead.

const res = await Coll.rawCollection().aggregate(aggregation).toArray()

Thanks. This works perfectly !