Publish function can only return a Cursor or an array of Cursors

how to publish aggregate

You should use one of the available aggregation publish packages. For example jcbernack:reactive-aggregate, tunguska:reactive-aggregate or lamoglia:publish-aggregation.

thanks :hugs::hugs::hugs:

1 Like