mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Adds a link to badges settings in the user table, where admins can set the available badges.
55 lines
911 B
JavaScript
55 lines
911 B
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export const queryBadges = () => gql`
|
|
query {
|
|
Badge {
|
|
id
|
|
type
|
|
icon
|
|
description
|
|
}
|
|
}
|
|
`
|
|
|
|
export const setVerificationBadge = () => gql`
|
|
mutation ($badgeId: ID!, $userId: ID!) {
|
|
setVerificationBadge(badgeId: $badgeId, userId: $userId) {
|
|
id
|
|
badgeVerification {
|
|
id
|
|
}
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const rewardTrophyBadge = () => gql`
|
|
mutation ($badgeId: ID!, $userId: ID!) {
|
|
rewardTrophyBadge(badgeId: $badgeId, userId: $userId) {
|
|
id
|
|
badgeVerification {
|
|
id
|
|
}
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const revokeBadge = () => gql`
|
|
mutation ($badgeId: ID!, $userId: ID!) {
|
|
revokeBadge(badgeId: $badgeId, userId: $userId) {
|
|
id
|
|
badgeVerification {
|
|
id
|
|
}
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`
|