NYYU Logo
APIUser

Change Password by User

User operation to update their own password

Change Password

USER

Allow authenticated users to change their own password for enhanced security.

Mutation

GraphQL Schema

changePassword(newPassword: String!): String!

Parameters

newPasswordString!
Required

New password (minimum 8 characters, must include uppercase, lowercase, number, and special character)

Example Usage

mutation {
  changePassword(newPassword: "NewSecurePass123!")
}
{
  "data": {
    "changePassword": "Success"
  }
}
const mutation = `
  mutation ChangePassword($newPassword: String!) {
    changePassword(newPassword: $newPassword)
  }
`;

const result = await client.request(mutation, {
  newPassword: 'NewSecurePass123!',
});

Security Considerations

Password Requirements

Passwords must meet minimum security requirements: 8+ characters, mixed case, numbers, and special characters.

Session Invalidation

Changing password will invalidate all existing sessions. User must log in again with the new password.