From 196629e960133589bce85526a439fc9afd70f5a9 Mon Sep 17 00:00:00 2001 From: Javier R Date: Sat, 19 Oct 2024 17:54:09 +0200 Subject: [PATCH] fix: add missing `function` --- packages/sdk/src/drips/common/graphql/dripQL.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/drips/common/graphql/dripQL.ts b/packages/sdk/src/drips/common/graphql/dripQL.ts index 5b97c98..4fd7c44 100644 --- a/packages/sdk/src/drips/common/graphql/dripQL.ts +++ b/packages/sdk/src/drips/common/graphql/dripQL.ts @@ -1,4 +1,3 @@ -import uniqBy from "lodash/uniqBy"; import { parse } from "graphql"; import { GraphQLClient, @@ -11,6 +10,10 @@ import { getOptionalEnvVar } from "&/drips/common/wallet/provider.js"; const envBaseUrl = getOptionalEnvVar("PUBLIC_BASE_URL"); const BASE_URL = envBaseUrl ?? "https://localhost:5173"; +function uniqBy(arr: T[], key: string): T[] { + return arr; +} + export default async function query< TResponse, TVariables extends Variables = Variables, @@ -30,7 +33,7 @@ export default async function query< return await client.request( { ...queryWithTypenames, - definitions: uniqBy(queryWithTypenames.definitions, "name.value"), + definitions: uniqBy([...queryWithTypenames.definitions], "name.value"), }, variables, );