Skip to content

Commit

Permalink
make it not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoGraffe committed Nov 2, 2023
1 parent 92db4b0 commit ef81ec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/api/zeus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export const HEADERS = {}
import { createClient, type Sink } from 'graphql-ws';

export const apiSubscription = (options: chainOptions) => {

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][] = [];
// const headers : HeadersInit = passedHeaders ? passedHeaders : empty;
const client = createClient({
url: String(options[0]),

connectionParams: h !== undefined ? Object.fromEntries(new Headers(h).entries()) : undefined,
});

Expand Down

0 comments on commit ef81ec3

Please sign in to comment.