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

70 lines
1.1 KiB
GraphQL
Raw Normal View History

fragment basicMutationReturnFields on MutationReturnInterface{
code
message
success
}
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
}
}
}
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!) {
createUser(user: $user) {
...basicMutationReturnFields
user {
2022-09-04 10:45:03 +00:00
...userFields
}
}
}
mutation DeleteUser($username: String!) {
deleteUser(username: $username) {
...basicMutationReturnFields
}
}
mutation UpdateUser($user: UserMutationInput!) {
updateUser(user: $user) {
...basicMutationReturnFields
user {
2022-09-04 10:45:03 +00:00
...userFields
}
}
}
mutation AddSshKey($sshInput: SshMutationInput!) {
addSshKey(sshInput: $sshInput) {
...basicMutationReturnFields
user {
...userFields
}
}
2022-09-04 10:45:03 +00:00
}
mutation RemoveSshKey($sshInput: SshMutationInput!) {
removeSshKey(sshInput: $sshInput) {
...basicMutationReturnFields
user {
...userFields
}
}
}