Skip to content

Commit

Permalink
fix ws
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Jun 26, 2024
1 parent c0c76bb commit eb8455d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 17 deletions.
6 changes: 1 addition & 5 deletions client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ import { ApolloLink, concat, split } from 'apollo-link';
import { WebSocketLink } from 'apollo-link-ws';
import fetch from 'node-fetch';
import path from 'path';
import ws from 'ws';
import { debug } from './debug';

const moduleLog = debug.extend('client')

let ws;
if (typeof(window) !== 'object') {
ws = require('ws');
}

const DEEP_FOUNDATION_HASURA_RELATIVE: boolean | undefined = ((r) => r ? !!+r : undefined)(process.env.DEEP_FOUNDATION_HASURA_RELATIVE);
const NEXT_PUBLIC_DEEP_FOUNDATION_HASURA_RELATIVE: boolean | undefined = ((r) => r ? !!+r : undefined)(process.env.NEXT_PUBLIC_DEEP_FOUNDATION_HASURA_RELATIVE);

Expand Down
39 changes: 30 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"normalize-url": "^7.0.2",
"path": "^0.12.7",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1"
"ts-node": "^10.9.1",
"ws": "^8.17.1"
},
"scripts": {
"package:refresh": "rm -rf node_modules; rm -f package-lock.json; npm i",
Expand All @@ -47,7 +48,6 @@
"apollo-link": "^1.2.14",
"apollo-link-ws": "^1.0.20",
"apollo-server-micro": "^2.21.0",
"react": "^18.2.0",
"ws": "^7.5.6"
"react": "^18.2.0"
}
}

0 comments on commit eb8455d

Please sign in to comment.