Vulcan/packages/nova-comments/lib/queries.js

25 lines
442 B
JavaScript

import Telescope from 'meteor/nova:lib';
import Comments from './collection.js';
// declare comments queries
Telescope.graphQL.addQuery(`
comments(postId: String): [Comment]
comment(_id: String): Comment
`);
Comments.graphQLQueries = {
single: `
_id
postId
parentCommentId
topLevelCommentId
body
htmlBody
postedAt
user {
_id
nova_slug
nova_emailHash # used for the avatar
}
`
}