mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- was throwing an error when trying to update commentsCount because of new implementation by @roschaefer which uses countResolver, but there was no related for commentsCount, it was r... also commentsCount is no longer needed anywhere in the code base, it is commentedCount now
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export default i18n => {
|
|
return {
|
|
CreateComment: gql`
|
|
mutation($postId: ID!, $content: String!) {
|
|
CreateComment(postId: $postId, content: $content) {
|
|
id
|
|
contentExcerpt
|
|
content
|
|
createdAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
disabled
|
|
deleted
|
|
shoutedCount
|
|
contributionsCount
|
|
commentedCount
|
|
followedByCount
|
|
followedByCurrentUser
|
|
badges {
|
|
id
|
|
icon
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
UpdateComment: gql`
|
|
mutation($content: String!, $id: ID!) {
|
|
UpdateComment(content: $content, id: $id) {
|
|
id
|
|
contentExcerpt
|
|
content
|
|
createdAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
disabled
|
|
deleted
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
}
|
|
}
|