Created
August 8, 2017 20:18
-
-
Save filipenevola/41d61f89a58375e78626df377f29a8df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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