mirror of
https://github.com/vale981/Vulcan
synced 2025-03-11 13:06:41 -04:00
53 lines
No EOL
1 KiB
JavaScript
53 lines
No EOL
1 KiB
JavaScript
import { createFragment } from 'apollo-client';
|
|
import gql from 'graphql-tag';
|
|
import Posts from 'meteor/nova:posts';
|
|
import Users from 'meteor/nova:users';
|
|
|
|
Posts.fragments = {
|
|
full: createFragment(gql`
|
|
fragment fullPostInfo on Post {
|
|
_id
|
|
title
|
|
url
|
|
body
|
|
htmlBody
|
|
slug
|
|
thumbnailUrl
|
|
baseScore
|
|
postedAt
|
|
sticky
|
|
status
|
|
categories {
|
|
# ...minimumCategoryInfo
|
|
_id
|
|
name
|
|
slug
|
|
}
|
|
commentCount
|
|
commenters {
|
|
# ...avatarUserInfo
|
|
_id
|
|
__displayName
|
|
__emailHash
|
|
__slug
|
|
}
|
|
upvoters {
|
|
_id
|
|
}
|
|
downvoters {
|
|
_id
|
|
}
|
|
upvotes # should be asked only for admins?
|
|
score # should be asked only for admins?
|
|
viewCount # should be asked only for admins?
|
|
clickCount # should be asked only for admins?
|
|
user {
|
|
# ...avatarUserInfo
|
|
_id
|
|
__displayName
|
|
__emailHash
|
|
__slug
|
|
}
|
|
}
|
|
`/*, Users.fragments.avatar*/),
|
|
} |