mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
* delete all old badges * reward/unrewardBadge * verification Badges * name all badged accordingly * more tests, lint * seed badges * profileBadge mechanic * badgesUnusedCount * seed profileBadges set * configure profile badge count * insert badges db:data:badges:default * seed commands to seed default badges and allow to seed branding data * copy data migrations when building docker * typo * correct data:branding command & document it * test new functionality * Update backend/src/db/seed/badges.ts Co-authored-by: Max <maxharz@gmail.com> * Update backend/src/db/seed/badges.ts Co-authored-by: Max <maxharz@gmail.com> * Update backend/src/db/seed/badges.ts Co-authored-by: Max <maxharz@gmail.com> * naming coventions * final naming fix lint fix build fix badge type in test renamed badge_ to trophy_ lint fixes small renameing fixes fix users spec fix webapp queries fix display * expose badge description --------- Co-authored-by: Max <maxharz@gmail.com>
99 lines
2.0 KiB
JavaScript
99 lines
2.0 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
|
|
isPostObservedByMe
|
|
postObservingUsersCount
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
disabled
|
|
deleted
|
|
shoutedCount
|
|
contributionsCount
|
|
commentedCount
|
|
followedByCount
|
|
followedByCurrentUser
|
|
badgeTrophies {
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
}
|
|
}
|