Skip to content

Commit

Permalink
fix(graphql): remove falsy checks in graphql resolvers
Browse files Browse the repository at this point in the history
These falsey checks allow certain inputs, particularly for `min/max` heights.
  • Loading branch information
dtfiedler authored Nov 29, 2023
1 parent 5199afc commit e600b36
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/graphql/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit e600b36

Please sign in to comment.