selfprivacy.org.app/lib/logic/api_maps/graphql_maps/schema/users.graphql

77 lines
1.2 KiB
GraphQL
Raw Normal View History

2022-09-04 10:45:03 +00:00
fragment userFields on User{
username
userType
sshKeys
}
query AllUsers {
users {
allUsers {
2022-09-04 10:45:03 +00:00
...userFields
}
rootUser: getUser(username: "root") {
...userFields
}
}
}
query GetUser($username: String!) {
users {
getUser(username: $username) {
2022-09-04 10:45:03 +00:00
...userFields
}
}
}
2022-09-04 10:45:03 +00:00
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
}
2022-09-04 10:45:03 +00:00
}
}
}
mutation AddSshKey($sshInput: SshMutationInput!) {
users {
addSshKey(sshInput: $sshInput) {
...basicMutationReturnFields
user {
...userFields
}
}
}
2022-09-04 10:45:03 +00:00
}
mutation RemoveSshKey($sshInput: SshMutationInput!) {
users {
removeSshKey(sshInput: $sshInput) {
...basicMutationReturnFields
user {
...userFields
}
2022-09-04 10:45:03 +00:00
}
}
}