mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- 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(?)
36 lines
657 B
JavaScript
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
}
|