Skip to content

Instantly share code, notes, and snippets.

@filipenevola
Created August 8, 2017 20:18
Show Gist options
  • Select an option

  • Save filipenevola/41d61f89a58375e78626df377f29a8df to your computer and use it in GitHub Desktop.

Select an option

Save filipenevola/41d61f89a58375e78626df377f29a8df to your computer and use it in GitHub Desktop.
Meteor.publishComposite("commentsAndUsersByPost", (postId) => {
return {
find() {
return Comments.findByPostId(postId);
},
children: [
{
find(comment) {
return Users.findBasicDataByIds([comment.userId]);
}
}
]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment