diff --git a/src/graphql/mutation/auth-register.ts b/src/graphql/mutation/auth-register.ts index 59feec98..e6870955 100644 --- a/src/graphql/mutation/auth-register.ts +++ b/src/graphql/mutation/auth-register.ts @@ -1,8 +1,8 @@ import { gql } from '@urql/core' export default gql` - mutation RegisterMutation($email: String!, $password: String, $username: String) { - registerUser(email: $email, password: $password, username: $username) { + mutation RegisterMutation($email: String!, $password: String, $name: String) { + registerUser(email: $email, password: $password, name: $name) { error token user { diff --git a/src/graphql/types.gen.ts b/src/graphql/types.gen.ts index 59b0f1b2..db3e580b 100644 --- a/src/graphql/types.gen.ts +++ b/src/graphql/types.gen.ts @@ -261,7 +261,7 @@ export type MutationRateUserArgs = { export type MutationRegisterUserArgs = { email: Scalars['String'] password?: InputMaybe - username?: InputMaybe + name?: InputMaybe } export type MutationRemoveAuthorArgs = { diff --git a/src/utils/apiClient.ts b/src/utils/apiClient.ts index 8a74452c..30028c15 100644 --- a/src/utils/apiClient.ts +++ b/src/utils/apiClient.ts @@ -65,9 +65,10 @@ export const apiClient = { return response.data.signIn }, - authRegister: async ({ email, password = '', username = '' }): Promise => { + authRegister: async ({ email, password = '', name = '' }): Promise => { + // NOTE: name is to display const response = await publicGraphQLClient - .mutation(authRegisterMutation, { email, password, username }) + .mutation(authRegisterMutation, { email, password, name }) .toPromise() return response.data.registerUser },