From dee1b87b2da4cb6e66e0e4915fe18f875b92f599 Mon Sep 17 00:00:00 2001 From: CryptoGraffe Date: Wed, 1 Nov 2023 23:05:03 -0700 Subject: [PATCH] hack mode --- src/app/api/zeus/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/zeus/index.ts b/src/app/api/zeus/index.ts index 0a2a9cb..f845cb7 100644 --- a/src/app/api/zeus/index.ts +++ b/src/app/api/zeus/index.ts @@ -11,7 +11,7 @@ import { createClient, type Sink } from 'graphql-ws'; export const apiSubscription = (options: chainOptions) => { - const h = options[1]?.headers; + const h = options[1].headers; // const passedHeaders : HeadersInit = /*options[1]?.headers ??*/ new Headers(); // const h = {'authorization':passedHeaders['authorization'] ?? '','x-hasura-role':passedHeaders['x-hasura-role'] ?? ''}; // const empty : [string, string][] = []; @@ -19,7 +19,7 @@ export const apiSubscription = (options: chainOptions) => { const client = createClient({ url: String(options[0]), - connectionParams: h !== undefined ? Object.fromEntries(new Headers(h).entries()) : undefined, + connectionParams: h !== undefined ? Object.fromEntries(new Headers(h as HeadersInit).entries()) : undefined, }); const ws = new Proxy(