GraphQL Reset Password Mutation: How to get code as a variable?

System Information
  • Strapi Version: v3.4.6
  • Operating System: Ubuntu Focal 20.04 LTS
  • Database: MongoDB
  • Node Version: v14.15.5
  • NPM Version: v6.14.11
  • Yarn Version: v1.22.5

Hello, I followed GraphQL reset password mutation but it requires code. How can I get the code ? I am testing resetPassword mutation in GraphQL Playground.

Here is the Reset Password mutation :

mutation ResetPassword(
  $password: String!
  $passwordConfirmation: String!
  $code: String!
) {
  resetPassword(
    password: $password
    passwordConfirmation: $passwordConfirmation
    code: $code
  ) {
    jwt
    user {
      id
      username
      email
      confirmed
      blocked
      role {
        name
      }
    }
  }
}

This is the variables :

{
  "password": "MyPassword",
  "passwordConfirmation": "MyPassword",
  "code": ""
}

Your help will be appreciated, thanks :slight_smile: