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

55 lines
726 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 {
2017-09-14 19:47:35 +02:00
# posts
2017-09-04 19:56:33 +09:00
_id
title
url
slug
postedAt
createdAt
sticky
status
excerpt
viewCount
clickCount
2017-09-14 19:47:35 +02:00
# users
2017-09-04 19:56:33 +09:00
userId
user {
...UsersMinimumInfo
}
2017-09-14 19:47:35 +02:00
# embedly
thumbnailUrl
2017-09-14 19:47:35 +02:00
# categories
2017-09-04 19:56:33 +09:00
categories {
...CategoriesMinimumInfo
}
2017-09-14 19:47:35 +02:00
# comments
2017-09-04 19:56:33 +09:00
commentCount
commenters {
...UsersMinimumInfo
}
2017-09-14 19:47:35 +02:00
# voting
upvoters {
_id
}
downvoters {
_id
}
2017-09-14 19:47:35 +02:00
upvotes
downvotes
baseScore
score
2017-09-04 19:56:33 +09:00
}
`);
registerFragment(`
fragment PostsPage on Post {
...PostsList
body
htmlBody
}
`);