From 174b1e78910ce60a2765c40cb252f18ca52b4a5a Mon Sep 17 00:00:00 2001 From: grezle <4310551+grezle@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:15:51 +0100 Subject: [PATCH] fix(supagraph): fix sort on int field --- packages/supagraph/src/graphql/queries.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/supagraph/src/graphql/queries.ts b/packages/supagraph/src/graphql/queries.ts index 9e7ffe0f..d0dac81a 100644 --- a/packages/supagraph/src/graphql/queries.ts +++ b/packages/supagraph/src/graphql/queries.ts @@ -234,8 +234,8 @@ export const createMultiQuery = ( orderBy ? parseFloat( direction + - ((a[orderBy as string] as string) || "").localeCompare( - (b[orderBy as string] as string) || "", + String((a[orderBy as string] as string) || "").localeCompare( + String((b[orderBy as string] as string) || ""), undefined, { numeric: true } )