mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
26 lines
444 B
JavaScript
26 lines
444 B
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export const FetchAllRoles = gql`
|
|
query {
|
|
__type(name: "UserGroup") {
|
|
name
|
|
enumValues {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const updateUserRole = (role, id) => {
|
|
return gql`
|
|
mutation {
|
|
switchUserRole(role: ${role}, id: "${id}" ) {
|
|
name
|
|
role
|
|
id
|
|
updatedAt
|
|
email
|
|
}
|
|
}`
|
|
}
|