Vulcan/packages/nova-comments/lib/queries.js
2016-11-08 15:04:17 +09:00

27 lines
462 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
telescope {
slug
emailHash # used for the avatar
}
}
`
}