@szymonpiatek/nextwordpress 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3399,9 +3399,6 @@ var GQL_SEND_PASSWORD_RESET_EMAIL = `
3399
3399
  mutation SendPasswordResetEmail($input: SendPasswordResetEmailInput!) {
3400
3400
  sendPasswordResetEmail(input: $input) {
3401
3401
  success
3402
- user {
3403
- email
3404
- }
3405
3402
  }
3406
3403
  }
3407
3404
  `;
@@ -3420,7 +3417,11 @@ function createPasswordResetMutations(fetcher) {
3420
3417
  const { gqlMutate } = fetcher;
3421
3418
  async function sendPasswordResetEmail(input) {
3422
3419
  const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
3423
- return data.sendPasswordResetEmail;
3420
+ const result = data.sendPasswordResetEmail;
3421
+ if (!result.success) {
3422
+ throw new WPGraphQLError(ErrorCode.GQL_ERRORS_IN_RESPONSE, 200, "sendPasswordResetEmail", "User not found");
3423
+ }
3424
+ return result;
3424
3425
  }
3425
3426
  async function resetUserPassword(input) {
3426
3427
  const data = await gqlMutate(GQL_RESET_USER_PASSWORD, { input });