mirror of
https://github.com/unraid/api.git
synced 2026-01-28 19:49:08 -06:00
16
app/graphql/schema/types/users/me.graphql
Normal file
16
app/graphql/schema/types/users/me.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
type Query {
|
||||
"""Current user account"""
|
||||
me: Me @func(module: "get-me")
|
||||
}
|
||||
|
||||
# type Mutation {
|
||||
# }
|
||||
|
||||
"""The current user"""
|
||||
type Me implements UserAccount {
|
||||
id: String!
|
||||
name: String!
|
||||
description: String!
|
||||
role: String!
|
||||
permissions: JSON
|
||||
}
|
||||
@@ -1,10 +1,15 @@
|
||||
interface UserAccount {
|
||||
id: String!
|
||||
name: String!
|
||||
description: String!
|
||||
role: String!
|
||||
}
|
||||
|
||||
input usersInput {
|
||||
slim: Boolean
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""Current user"""
|
||||
me: User
|
||||
"""User account"""
|
||||
user(id: String!): User @func(module: "users/id/get-user")
|
||||
"""User accounts"""
|
||||
@@ -17,17 +22,24 @@ input addUserInput {
|
||||
description: String
|
||||
}
|
||||
|
||||
input deleteUserInput {
|
||||
name: String!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
"""Add a new user"""
|
||||
addUser(input: addUserInput!): User @func(module: "add-user")
|
||||
"""Delete a user"""
|
||||
deleteUser(input: deleteUserInput!): User @func(module: "users/id/delete-user")
|
||||
}
|
||||
|
||||
"""A local user account"""
|
||||
type User {
|
||||
type User implements UserAccount {
|
||||
id: String!
|
||||
"""A unique name for the user"""
|
||||
name: String
|
||||
description: String
|
||||
name: String!
|
||||
description: String!
|
||||
role: String!
|
||||
"""If the account has a password set"""
|
||||
password: Boolean
|
||||
}
|
||||
Reference in New Issue
Block a user