Skip to content

Commit

Permalink
changed mutation names in test also
Browse files Browse the repository at this point in the history
  • Loading branch information
sadakchap committed Mar 27, 2021
1 parent 5bae516 commit c427ca9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion spec/ParseGraphQLServer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7148,7 +7148,7 @@ describe('ParseGraphQLServer', () => {
},
},
});
console.log(result);

expect(result.data.logIn.clientMutationId).toEqual(clientMutationId);
expect(result.data.logIn.viewer.sessionToken).toBeDefined();
expect(typeof result.data.logIn.viewer.sessionToken).toBe('string');
Expand Down
42 changes: 21 additions & 21 deletions src/GraphQL/loaders/usersMutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ const load = parseGraphQLSchema => {
parseGraphQLSchema.addGraphQLType(logOutMutation.type, true, true);
parseGraphQLSchema.addGraphQLMutation('logOut', logOutMutation, true, true);

const requestResetPasswordMutation = mutationWithClientMutationId({
name: 'RequestResetPassword',
const resetPasswordMutation = mutationWithClientMutationId({
name: 'ResetPassword',
description:
'The requestResetPassword mutation can be used to reset the password of an existing user.',
'The resetPassword mutation can be used to reset the password of an existing user.',
inputFields: {
email: {
descriptions: 'Email of the user that should receive the reset email',
Expand Down Expand Up @@ -247,23 +247,14 @@ const load = parseGraphQLSchema => {
},
});

parseGraphQLSchema.addGraphQLType(
requestResetPasswordMutation.args.input.type.ofType,
true,
true
);
parseGraphQLSchema.addGraphQLType(requestResetPasswordMutation.type, true, true);
parseGraphQLSchema.addGraphQLMutation(
'requestResetPassword',
requestResetPasswordMutation,
true,
true
);
parseGraphQLSchema.addGraphQLType(resetPasswordMutation.args.input.type.ofType, true, true);
parseGraphQLSchema.addGraphQLType(resetPasswordMutation.type, true, true);
parseGraphQLSchema.addGraphQLMutation('resetPassword', resetPasswordMutation, true, true);

const resetPasswordMutation = mutationWithClientMutationId({
name: 'ResetPassword',
const confirmResetPasswordMutation = mutationWithClientMutationId({
name: 'ConfirmResetPassword',
description:
'The resetPassword mutation can be used to reset the password of an existing user.',
'The confirmResetPassword mutation can be used to reset the password of an existing user.',
inputFields: {
username: {
descriptions: 'Username of the user that have received the reset email',
Expand Down Expand Up @@ -302,9 +293,18 @@ const load = parseGraphQLSchema => {
},
});

parseGraphQLSchema.addGraphQLType(resetPasswordMutation.args.input.type.ofType, true, true);
parseGraphQLSchema.addGraphQLType(resetPasswordMutation.type, true, true);
parseGraphQLSchema.addGraphQLMutation('resetPassword', resetPasswordMutation, true, true);
parseGraphQLSchema.addGraphQLType(
confirmResetPasswordMutation.args.input.type.ofType,
true,
true
);
parseGraphQLSchema.addGraphQLType(confirmResetPasswordMutation.type, true, true);
parseGraphQLSchema.addGraphQLMutation(
'confirmResetPassword',
confirmResetPasswordMutation,
true,
true
);

const sendVerificationEmailMutation = mutationWithClientMutationId({
name: 'SendVerificationEmail',
Expand Down

0 comments on commit c427ca9

Please sign in to comment.