Skip to content

Commit

Permalink
fix: add missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jabolol committed Oct 19, 2024
1 parent b5dea9e commit 196629e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/sdk/src/drips/common/graphql/dripQL.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import uniqBy from "lodash/uniqBy";
import { parse } from "graphql";
import {
GraphQLClient,
Expand All @@ -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<T>(arr: T[], key: string): T[] {
return arr;
}

export default async function query<
TResponse,
TVariables extends Variables = Variables,
Expand All @@ -30,7 +33,7 @@ export default async function query<
return await client.request<TResponse>(
{
...queryWithTypenames,
definitions: uniqBy(queryWithTypenames.definitions, "name.value"),
definitions: uniqBy([...queryWithTypenames.definitions], "name.value"),
},
variables,
);
Expand Down

0 comments on commit 196629e

Please sign in to comment.