mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
One is how many comments you wrote, one is how many **posts** are there with at least one comment of you. E.g. you can comment twice on the same post. You will have a `commentedCount` increase of 1 but a `commentsCount` of 2. FYI @ogerly @Tirokk
80 lines
1.4 KiB
JavaScript
80 lines
1.4 KiB
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export default i18n => {
|
|
const lang = i18n.locale().toUpperCase()
|
|
return gql(`
|
|
query User($id: ID!) {
|
|
User(id: $id) {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
about
|
|
disabled
|
|
deleted
|
|
locationName
|
|
location {
|
|
name: name${lang}
|
|
}
|
|
createdAt
|
|
badges {
|
|
id
|
|
key
|
|
icon
|
|
}
|
|
badgesCount
|
|
shoutedCount
|
|
commentedCount
|
|
followingCount
|
|
following(first: 7) {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
disabled
|
|
deleted
|
|
followedByCount
|
|
followedByCurrentUser
|
|
contributionsCount
|
|
commentsCount
|
|
badges {
|
|
id
|
|
key
|
|
icon
|
|
}
|
|
location {
|
|
name: name${lang}
|
|
}
|
|
}
|
|
followedByCount
|
|
followedByCurrentUser
|
|
followedBy(first: 7) {
|
|
id
|
|
slug
|
|
name
|
|
disabled
|
|
deleted
|
|
avatar
|
|
followedByCount
|
|
followedByCurrentUser
|
|
contributionsCount
|
|
commentsCount
|
|
badges {
|
|
id
|
|
key
|
|
icon
|
|
}
|
|
location {
|
|
name: name${lang}
|
|
}
|
|
}
|
|
contributionsCount
|
|
socialMedia {
|
|
id
|
|
url
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
}
|