Files
twenty/front/src/modules/users/queries/update.ts
gitstart-twenty d142376ef9 feat: I can delete my account easily (#977)
* Add support for account deletion

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add more fixes

Co-authored-by: Benjamin Mayanja <vibenjamin6@gmail.com>

* Add more fixes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
2023-07-28 10:09:43 -07:00

53 lines
994 B
TypeScript

import { gql } from '@apollo/client';
export const UPDATE_USER = gql`
mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
updateUser(data: $data, where: $where) {
id
email
displayName
firstName
lastName
avatarUrl
workspaceMember {
id
workspace {
id
domainName
displayName
logo
inviteHash
}
}
settings {
id
locale
colorScheme
}
}
}
`;
export const UPDATE_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file)
}
`;
export const REMOVE_PROFILE_PICTURE = gql`
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
updateUser(data: { avatarUrl: null }, where: $where) {
id
avatarUrl
}
}
`;
export const DELETE_USER_ACCOUNT = gql`
mutation DeleteUserAccount {
deleteUserAccount {
id
}
}
`;