From e600b3607aaa6a03a5f2e2253128311cb6f1434d Mon Sep 17 00:00:00 2001 From: Dylan Fiedler Date: Wed, 29 Nov 2023 12:27:46 -0700 Subject: [PATCH] fix(graphql): remove falsy checks in graphql resolvers These falsey checks allow certain inputs, particularly for `min/max` heights. --- src/graphql/resolvers.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/graphql/resolvers.ts b/src/graphql/resolvers.ts index 000ae68..2be2786 100644 --- a/src/graphql/resolvers.ts +++ b/src/graphql/resolvers.ts @@ -55,16 +55,16 @@ export const resolvers = { const params: QueryParams = { limit: pageSize + 1, offset, - ids: queryParams.ids || undefined, - to: queryParams.recipients || undefined, - from: queryParams.owners || undefined, - tags: queryParams.tags || undefined, + ids: queryParams.ids, + to: queryParams.recipients, + from: queryParams.owners, + tags: queryParams.tags, blocks: true, since: timestamp, select: fieldMap, - minHeight: queryParams.block?.min || undefined, - maxHeight: queryParams.block?.max || undefined, - sortOrder: queryParams.sort || undefined, + minHeight: queryParams.block?.min, + maxHeight: queryParams.block?.max, + sortOrder: queryParams.sort, }; const results = (await generateQuery(params, connection)) as TransactionHeader[];