mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-08 01:43:13 +00:00
76 lines
1.2 KiB
GraphQL
76 lines
1.2 KiB
GraphQL
|
fragment basicMutationReturnFields on MutationReturnInterface{
|
||
|
code
|
||
|
message
|
||
|
success
|
||
|
}
|
||
|
|
||
|
|
||
|
mutation CreateUser($user: UserMutationInput!) {
|
||
|
createUser(user: $user) {
|
||
|
...basicMutationReturnFields
|
||
|
user {
|
||
|
username
|
||
|
userType
|
||
|
sshKeys
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
query AllUsers {
|
||
|
users {
|
||
|
allUsers {
|
||
|
userType
|
||
|
username
|
||
|
sshKeys
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
mutation AddSshKey($sshInput: SshMutationInput!) {
|
||
|
addSshKey(sshInput: $sshInput) {
|
||
|
...basicMutationReturnFields
|
||
|
user {
|
||
|
sshKeys
|
||
|
userType
|
||
|
username
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
query GetUser($username: String!) {
|
||
|
users {
|
||
|
getUser(username: $username) {
|
||
|
sshKeys
|
||
|
userType
|
||
|
username
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
mutation RemoveSshKey($sshInput: SshMutationInput!) {
|
||
|
removeSshKey(sshInput: $sshInput) {
|
||
|
...basicMutationReturnFields
|
||
|
user {
|
||
|
sshKeys
|
||
|
userType
|
||
|
username
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
mutation DeleteUser($username: String!) {
|
||
|
deleteUser(username: $username) {
|
||
|
...basicMutationReturnFields
|
||
|
}
|
||
|
}
|
||
|
|
||
|
mutation UpdateUser($user: UserMutationInput!) {
|
||
|
updateUser(user: $user) {
|
||
|
...basicMutationReturnFields
|
||
|
user {
|
||
|
sshKeys
|
||
|
userType
|
||
|
username
|
||
|
}
|
||
|
}
|
||
|
}
|