Skip to content

Commit

Permalink
hack mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoGraffe committed Nov 2, 2023
1 parent ef81ec3 commit dee1b87
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 @@ -11,15 +11,15 @@ import { createClient, type Sink } from 'graphql-ws';

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

const h = options[1]?.headers;
const h = options[1].headers;

Check failure on line 14 in src/app/api/zeus/index.ts

View workflow job for this annotation

GitHub Actions / build-test

Object is possibly 'undefined'.

Check failure on line 14 in src/app/api/zeus/index.ts

View workflow job for this annotation

GitHub Actions / build-test

Object is possibly 'undefined'.
// 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,
connectionParams: h !== undefined ? Object.fromEntries(new Headers(h as HeadersInit).entries()) : undefined,
});

const ws = new Proxy(
Expand Down

0 comments on commit dee1b87

Please sign in to comment.