@graphql-tools/executor-legacy-ws 1.1.10 → 1.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -27,7 +27,7 @@ function buildWSLegacyExecutor(subscriptionsEndpoint, WebSocketImpl, options) {
27
27
  websocket = new WebSocketImpl(subscriptionsEndpoint, 'graphql-ws', {
28
28
  followRedirects: true,
29
29
  headers: options?.headers,
30
- rejectUnauthorized: false,
30
+ rejectUnauthorized: options?.rejectUnauthorized ?? true,
31
31
  skipUTF8Validation: true,
32
32
  });
33
33
  websocket.onopen = () => {
package/esm/index.js CHANGED
@@ -22,7 +22,7 @@ export function buildWSLegacyExecutor(subscriptionsEndpoint, WebSocketImpl, opti
22
22
  websocket = new WebSocketImpl(subscriptionsEndpoint, 'graphql-ws', {
23
23
  followRedirects: true,
24
24
  headers: options?.headers,
25
- rejectUnauthorized: false,
25
+ rejectUnauthorized: options?.rejectUnauthorized ?? true,
26
26
  skipUTF8Validation: true,
27
27
  });
28
28
  websocket.onopen = () => {
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@graphql-tools/executor-legacy-ws",
3
- "version": "1.1.10",
3
+ "version": "1.1.35",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/utils": "^10.7.2",
10
+ "@graphql-tools/utils": "^12.0.1",
11
11
  "@types/ws": "^8.0.0",
12
12
  "isomorphic-ws": "^5.0.0",
13
13
  "tslib": "^2.4.0",
14
- "ws": "^8.17.1"
14
+ "ws": "^8.21.3"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "ardatan/graphql-tools",
18
+ "url": "git+https://github.com/ardatan/graphql-tools.git",
19
19
  "directory": "packages/executors/legacy-ws"
20
20
  },
21
21
  "author": "Arda TANRIKULU <ardatanrikulu@gmail.com>",
@@ -15,5 +15,11 @@ export declare enum LEGACY_WS {
15
15
  export interface LegacyWSExecutorOpts {
16
16
  connectionParams?: Record<string, unknown> | (() => Record<string, unknown>);
17
17
  headers?: Record<string, any>;
18
+ /**
19
+ * Whether to reject unauthorized TLS certificates when connecting over `wss://`.
20
+ * Defaults to `true`. Set to `false` only for trusted environments that use
21
+ * self-signed certificates (for example local development).
22
+ */
23
+ rejectUnauthorized?: boolean;
18
24
  }
19
25
  export declare function buildWSLegacyExecutor(subscriptionsEndpoint: string, WebSocketImpl: typeof WebSocket, options?: LegacyWSExecutorOpts): DisposableExecutor;
@@ -15,5 +15,11 @@ export declare enum LEGACY_WS {
15
15
  export interface LegacyWSExecutorOpts {
16
16
  connectionParams?: Record<string, unknown> | (() => Record<string, unknown>);
17
17
  headers?: Record<string, any>;
18
+ /**
19
+ * Whether to reject unauthorized TLS certificates when connecting over `wss://`.
20
+ * Defaults to `true`. Set to `false` only for trusted environments that use
21
+ * self-signed certificates (for example local development).
22
+ */
23
+ rejectUnauthorized?: boolean;
18
24
  }
19
25
  export declare function buildWSLegacyExecutor(subscriptionsEndpoint: string, WebSocketImpl: typeof WebSocket, options?: LegacyWSExecutorOpts): DisposableExecutor;