Allow to edit account email and delete account
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user