diff --git a/packages/graphql/src/invoices.ts b/packages/graphql/src/invoices.ts index 119b45a7..d0ca8ba7 100644 --- a/packages/graphql/src/invoices.ts +++ b/packages/graphql/src/invoices.ts @@ -31,7 +31,7 @@ const invoicesQuery = ( skip?: number, orderBy?: Invoice_orderBy, orderDirection?: OrderDirection, - where?: any, + where?: ReturnType, ) => typedGql('query', { scalars })({ invoices: [ @@ -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, diff --git a/packages/graphql/src/scalars.ts b/packages/graphql/src/scalars.ts index 1f907893..d5881d82 100644 --- a/packages/graphql/src/scalars.ts +++ b/packages/graphql/src/scalars.ts @@ -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), }, });