Skip to content

Commit

Permalink
fix(dapp): fix invoices query
Browse files Browse the repository at this point in the history
  • Loading branch information
moconnell committed Jan 29, 2024
1 parent 6253e3d commit 7ca0078
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/graphql/src/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const invoicesQuery = (
skip?: number,
orderBy?: Invoice_orderBy,
orderDirection?: OrderDirection,
where?: any,
where?: ReturnType<typeof buildInvoicesFilter>,
) =>
typedGql('query', { scalars })({
invoices: [
Expand Down Expand Up @@ -73,7 +73,9 @@ export const fetchInvoices = async (

const sortDirection = sortDesc ? OrderDirection.desc : OrderDirection.asc;
const where = buildInvoicesFilter(searchInput);
console.log(where);

logDebug({ chainId, pageIndex, pageSize, sortBy, sortDirection, where });

const query = invoicesQuery(
pageSize,
pageIndex * pageSize,
Expand Down
8 changes: 4 additions & 4 deletions packages/graphql/src/scalars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { ZeusScalars } from './zeus';

export const scalars = ZeusScalars({
BigDecimal: {
encode: (e: unknown) => (e as bigint).toString(),
encode: (e: unknown) => (e as bigint).toString(16),
decode: (e: unknown) => BigInt(e as string),
},
BigInt: {
encode: (e: unknown) => (e as bigint).toString(16),
decode: (e: unknown) => BigInt(e as string),
},
Bytes: {
encode: (e: unknown) => e as string,
decode: (e: unknown) => e as string,
Int8: {
encode: (e: unknown) => (e as number).toString(),
decode: (e: unknown) => Number(e as string),
},
});

0 comments on commit 7ca0078

Please # to comment.