Introduce basic user and profile management

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-11 19:13:21 +02:00
parent da4ea84baf
commit beb35a09c6
51 changed files with 1808 additions and 254 deletions

View File

@@ -64,8 +64,8 @@ export const VALIDATE_EMAIL = gql`
`;
export const DELETE_ACCOUNT = gql`
mutation DeleteAccount($password: String!) {
deleteAccount(password: $password) {
mutation DeleteAccount($password: String, $userId: ID!) {
deleteAccount(password: $password, userId: $userId) {
id
}
}
@@ -134,3 +134,58 @@ export const SET_USER_SETTINGS = gql`
}
${USER_SETTINGS_FRAGMENT}
`;
export const LIST_USERS = gql`
query ListUsers($email: String, $page: Int, $limit: Int) {
users(email: $email, page: $page, limit: $limit) {
total
elements {
id
email
locale
confirmedAt
disabled
actors {
id
preferredUsername
avatar {
url
}
name
summary
}
settings {
timezone
}
}
}
}
`;
export const GET_USER = gql`
query GetUser($id: ID!) {
user(id: $id) {
id
email
confirmedAt
confirmationSentAt
locale
disabled
defaultActor {
id
}
actors {
id
preferredUsername
name
avatar {
url
}
}
participations {
total
}
role
}
}
`;