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

50 lines
686 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
2017-09-25 22:09:09 +02:00
currentUserVotes{
...VoteFragment
}
2017-09-14 19:47:35 +02:00
baseScore
score
2017-09-04 19:56:33 +09:00
}
`);
registerFragment(`
fragment PostsPage on Post {
...PostsList
body
htmlBody
}
`);