Skip to content

Commit

Permalink
Merge pull request #368 from bakaphp/feat/social-login
Browse files Browse the repository at this point in the history
feat: updateEmail mutation
  • Loading branch information
AudryLopez authored Dec 26, 2024
2 parents 2116719 + ae03b6a commit f2c5b02
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.23.2",
"version": "0.23.3",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
9 changes: 9 additions & 0 deletions src/modules/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
SHARE_USER_MUTATION,
BLOCK_USER_MUTATION,
UNBLOCK_USER_MUTATION,
UPDATE_EMAIL_MUTATION,
} from '../../mutations';
import {
UserInterface,
Expand Down Expand Up @@ -327,4 +328,12 @@ export class Users {
});
return response.data.unBlockUser;
}

public async updateEmail(email: string): Promise<boolean > {
const response = await this.client.mutate({
mutation: UPDATE_EMAIL_MUTATION,
variables: { email },
});
return response.data;
}
}
6 changes: 6 additions & 0 deletions src/mutations/users.mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,10 @@ export const UNBLOCK_USER_MUTATION = gql`
mutation unBlockUser($id: ID!) {
unBlockUser(id: $id)
}
`;

export const UPDATE_EMAIL_MUTATION = gql`
mutation updateEmail($email: String!) {
updateEmail(email: $email)
}
`;

0 comments on commit f2c5b02

Please sign in to comment.