Vulcan/packages/example-forum/lib/modules/posts/fragments.js

55 lines
780 B
JavaScript
Raw Normal View History

2017-09-04 19:56:33 +09:00
import { registerFragment } from 'meteor/vulcan:core';
registerFragment(`
fragment PostsList on Post {
# vulcan:posts
_id
title
url
slug
postedAt
createdAt
sticky
status
excerpt
viewCount
clickCount
# vulcan:users
userId
user {
...UsersMinimumInfo
}
# vulcan:embedly
2017-09-04 20:06:06 +09:00
# thumbnailUrl
2017-09-04 19:56:33 +09:00
# vulcan:categories
categories {
...CategoriesMinimumInfo
}
# vulcan:comments
commentCount
commenters {
...UsersMinimumInfo
}
# vulcan:voting
#upvoters {
# _id
#}
#downvoters {
# _id
#}
#upvotes
#downvotes
#baseScore
#score
}
`);
registerFragment(`
fragment PostsPage on Post {
...PostsList
body
htmlBody
}
`);