From 13642133c1c663862df40ef4c827a5cd4cd4106f Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 22 Dec 2021 08:25:08 +0100 Subject: [PATCH] Moved the filter on creation to the query. --- backend/src/graphql/resolver/TransactionResolver.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index 51500ce56..d8ef1fb0f 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -359,6 +359,7 @@ async function listTransactions( limit, offset, order, + onlyCreations, ) skipFirstTransaction = userTransactionsCount > offset + limit const decay = !(currentPage > 1) @@ -380,11 +381,6 @@ async function listTransactions( const transactionList = new TransactionList() transactionList.count = userTransactionsCount - if (onlyCreations) { - transactions = transactions.filter((transaction) => { - return transaction.type === 'creation' - }) - } transactionList.transactions = transactions return transactionList }