From a0eb707375db0b56c7592e07d7e25754e33dec92 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 30 Mar 2022 18:21:52 +0200 Subject: [PATCH 1/5] change name of mutation which was wrongly called as query --- frontend/src/graphql/mutations.js | 6 ++++++ frontend/src/graphql/queries.js | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/graphql/mutations.js b/frontend/src/graphql/mutations.js index 95c811f8d..3dbd8888e 100644 --- a/frontend/src/graphql/mutations.js +++ b/frontend/src/graphql/mutations.js @@ -18,6 +18,12 @@ export const setPassword = gql` } ` +export const forgotPassword = gql` + mutation($email: String!) { + forgotPassword(email: $email) + } +` + export const updateUserInfos = gql` mutation( $firstName: String diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js index ecd8208b5..b8622ef2d 100644 --- a/frontend/src/graphql/queries.js +++ b/frontend/src/graphql/queries.js @@ -81,12 +81,6 @@ export const transactionsQuery = gql` } ` -export const sendResetPasswordEmail = gql` - query($email: String!) { - sendResetPasswordEmail(email: $email) - } -` - export const listGDTEntriesQuery = gql` query($currentPage: Int!, $pageSize: Int!) { listGDTEntries(currentPage: $currentPage, pageSize: $pageSize) { From d4415ee256794552a2ff73e870f195e159a6d801 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 30 Mar 2022 18:22:49 +0200 Subject: [PATCH 2/5] use renamed mutation instead of badly named query --- frontend/src/pages/ForgotPassword.spec.js | 2 +- frontend/src/pages/ForgotPassword.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/ForgotPassword.spec.js b/frontend/src/pages/ForgotPassword.spec.js index a547f9cc1..321f04913 100644 --- a/frontend/src/pages/ForgotPassword.spec.js +++ b/frontend/src/pages/ForgotPassword.spec.js @@ -21,7 +21,7 @@ const createMockObject = (comingFrom) => { push: mockRouterPush, }, $apollo: { - query: mockAPIcall, + mutate: mockAPIcall, }, $route: { params: { diff --git a/frontend/src/pages/ForgotPassword.vue b/frontend/src/pages/ForgotPassword.vue index 81121fbe7..510567703 100644 --- a/frontend/src/pages/ForgotPassword.vue +++ b/frontend/src/pages/ForgotPassword.vue @@ -39,7 +39,7 @@