mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-08-25 06:21:52 +00:00
67 lines
1.1 KiB
GraphQL
67 lines
1.1 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!) {
|
|
createUser(user: $user) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation DeleteUser($username: String!) {
|
|
deleteUser(username: $username) {
|
|
...basicMutationReturnFields
|
|
}
|
|
}
|
|
|
|
mutation UpdateUser($user: UserMutationInput!) {
|
|
updateUser(user: $user) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation AddSshKey($sshInput: SshMutationInput!) {
|
|
addSshKey(sshInput: $sshInput) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|
|
|
|
mutation RemoveSshKey($sshInput: SshMutationInput!) {
|
|
removeSshKey(sshInput: $sshInput) {
|
|
...basicMutationReturnFields
|
|
user {
|
|
...userFields
|
|
}
|
|
}
|
|
}
|