Ocelot-Social/webapp/graphql/CommentQuery.js
Matt Rider 346158da7f Update to use autogenerated Comment Query
- using the custom CommentByPost Query was not returning the author of the Post, therefore the users avatar was not showing up
- there are some weird bugs with the comments, if you dblclick on the button, two comments with the same content are created
- sometimes the comments appear as the bottom of the list, sometimes they appear three comments from the bottom(?)
2019-05-02 19:59:35 -03:00

36 lines
657 B
JavaScript

import gql from 'graphql-tag'
export default app => {
const lang = app.$i18n.locale().toUpperCase()
return gql(`
query Comment($postId: ID) {
Comment(postId: $postId) {
id
contentExcerpt
createdAt
author {
id
slug
name
avatar
disabled
deleted
shoutedCount
contributionsCount
commentsCount
followedByCount
followedByCurrentUser
location {
name: name${lang}
}
badges {
id
key
icon
}
}
}
}
`)
}