diff --git a/package.json b/package.json index 290609d..07a7480 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.23.2", + "version": "0.23.3", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/modules/users/index.ts b/src/modules/users/index.ts index 0a82d88..c868081 100644 --- a/src/modules/users/index.ts +++ b/src/modules/users/index.ts @@ -25,6 +25,7 @@ import { SHARE_USER_MUTATION, BLOCK_USER_MUTATION, UNBLOCK_USER_MUTATION, + UPDATE_EMAIL_MUTATION, } from '../../mutations'; import { UserInterface, @@ -327,4 +328,12 @@ export class Users { }); return response.data.unBlockUser; } + + public async updateEmail(email: string): Promise { + const response = await this.client.mutate({ + mutation: UPDATE_EMAIL_MUTATION, + variables: { email }, + }); + return response.data; + } } diff --git a/src/mutations/users.mutation.ts b/src/mutations/users.mutation.ts index 567bf87..cbf20dc 100644 --- a/src/mutations/users.mutation.ts +++ b/src/mutations/users.mutation.ts @@ -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) + } `; \ No newline at end of file