发布多个游标

通过返回游标数组,可以从同一发布方法发布多个数据库游标。

儿童游标将被视为连接,不会被动反应。

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