Allow to edit account email and delete account

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-02-13 15:48:12 +01:00
parent 9fc3c7017f
commit 9f007da286
44 changed files with 2262 additions and 590 deletions

View File

@@ -30,6 +30,15 @@ mutation ValidateUser($token: String!) {
}
`;
export const LOGGED_USER = gql`
query {
loggedUser {
id,
email
}
}
`;
export const CHANGE_PASSWORD = gql`
mutation ChangePassword($oldPassword: String!, $newPassword: String!) {
changePassword(oldPassword: $oldPassword, newPassword: $newPassword) {
@@ -38,6 +47,32 @@ export const CHANGE_PASSWORD = gql`
}
`;
export const CHANGE_EMAIL = gql`
mutation ChangeEmail($email: String!, $password: String!) {
changeEmail(email: $email, password: $password) {
id
}
}
`;
export const VALIDATE_EMAIL = gql`
mutation ValidateEmail($token: String!) {
validateEmail(
token: $token
) {
id
}
}
`;
export const DELETE_ACCOUNT = gql`
mutation DeleteAccount($password: String!) {
deleteAccount (password: $password) {
id
}
}
`;
export const CURRENT_USER_CLIENT = gql`
query {
currentUser @client {