Files
talk/graph/resolvers/comment.js
T
2017-01-24 13:45:06 -07:00

17 lines
404 B
JavaScript

const Comment = {
user({author_id}, _, {loaders}) {
return loaders.Users.getByID.load(author_id);
},
replies({id}, _, {loaders}) {
return loaders.Comments.getByParentID.load(id);
},
actions({id}, _, {loaders}) {
return loaders.Actions.getByItemID.load(id);
},
asset({asset_id}, _, {loaders}) {
return loaders.Assets.getByID.load(asset_id);
}
};
module.exports = Comment;