Skip to main content

Reset Password By Admin

note

The functions described is accessible only to users with ADMIN privileges.

The resetPasswordByAdmin mutation allows an admin to reset a user's password. The new password is auto-generated and sent to the user by email.

Mutation: resetPasswordByAdmin

Schema:

resetPasswordByAdmin(
email: String!
): String

Parameters

  • email (String): The user's email address. This field is mandatory.

Return

The mutation returns a string indicating the result of the password reset attempt.

Example Mutation

The following is an example of how to use the resetPasswordByAdmin mutation to reset a user's password:

mutation {
resetPasswordByAdmin(
email: "user@example.com"
)
}

In this example, the mutation resets the password for the user with the email address user@example.com. The new password will be auto-generated and sent to the user's email. The return value will indicate whether the password reset was successful.