mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
97 lines
1.9 KiB
JavaScript
97 lines
1.9 KiB
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export default (i18n) => {
|
|
const lang = i18n.locale().toUpperCase()
|
|
return {
|
|
CreateComment: gql`
|
|
mutation($postId: ID!, $content: String!) {
|
|
CreateComment(postId: $postId, content: $content) {
|
|
id
|
|
contentExcerpt
|
|
content
|
|
createdAt
|
|
updatedAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
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
|
|
updatedAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
disabled
|
|
deleted
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
DeleteComment: gql`
|
|
mutation($id: ID!) {
|
|
DeleteComment(id: $id) {
|
|
id
|
|
contentExcerpt
|
|
content
|
|
createdAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
disabled
|
|
deleted
|
|
shoutedCount
|
|
contributionsCount
|
|
commentedCount
|
|
followedByCount
|
|
followedByCurrentUser
|
|
location {
|
|
name: name${lang}
|
|
}
|
|
badges {
|
|
id
|
|
icon
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
}
|
|
}
|