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(