mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
FYI: @Tirokk I think we'll never remove or add new badges through graphql. Instead, we will seed them manually with direct access to the database. Therefore I removed the respective mutations and also your tests regarding permissions.
35 lines
642 B
JavaScript
35 lines
642 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 {
|
|
key
|
|
icon
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
}
|