mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-14 04:33:16 +00:00
77 lines
1.2 KiB
GraphQL
77 lines
1.2 KiB
GraphQL
fragment userFields on User{
|
|
username
|
|
userType
|
|
sshKeys
|
|
}
|
|
|
|
query AllUsers {
|
|
users {
|
|
allUsers {
|
|
...userFields
|
|
}
|
|
rootUser: getUser(username: "root") {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
|
|
query GetUser($username: String!) {
|
|
users {
|
|
getUser(username: $username) {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation CreateUser($user: UserMutationInput!) {
|
|
users {
|
|
createUser(user: $user) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation DeleteUser($username: String!) {
|
|
users {
|
|
deleteUser(username: $username) {
|
|
...basicMutationReturnFields
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation UpdateUser($user: UserMutationInput!) {
|
|
users {
|
|
updateUser(user: $user) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation AddSshKey($sshInput: SshMutationInput!) {
|
|
users {
|
|
addSshKey(sshInput: $sshInput) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation RemoveSshKey($sshInput: SshMutationInput!) {
|
|
users {
|
|
removeSshKey(sshInput: $sshInput) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
}
|