Skip to content

Instantly share code, notes, and snippets.

@GoodnessEzeokafor
Created September 15, 2024 10:32
Show Gist options
  • Save GoodnessEzeokafor/3f4129fbef98fcdad9126af53b87d55c to your computer and use it in GitHub Desktop.
Save GoodnessEzeokafor/3f4129fbef98fcdad9126af53b87d55c to your computer and use it in GitHub Desktop.
Select technique
const selectFields = [
'id',
'currency',
'currencyType',
'amount',
'type',
'reference',
'description',
'status',
'user',
'appDescription',
'createdAt',
];
const filterQuery = this.transactionFactory.cleanTransactionQuery({
...payload,
});
const { data, pagination } =
await this.data.transactions.findAllWithPagination(
{
...filterQuery,
},
{
selectFields: this.selectFields,
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment