釋出多個遊標

通過返回遊標陣列,可以從同一釋出方法釋出多個資料庫遊標。

兒童遊標將被視為連線,不會被動反應。

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];
});