meteor Publishing Data Publish multiple cursors


Example

Multiple database cursors can be published from the same publication method by returning an array of cursors.

The "children" cursors will be treated as joins and will not be reactive.

Meteor.publish('USER_THREAD', function(postId) {
  let userId   = this.userId;

  let comments = Comments.find({ userId, postId });
  let replies  = Replies.find({ userId, postId });

  return [comments, replies];
});