Skip to content

Commit 6a459f4

Browse files
authored
fix: @graphiql/toolkit dependencies (#1968)
* remove `optionalDependencies` from `@graphiql/toolkit` * chore: add changeset
1 parent 6fee5d7 commit 6a459f4

File tree

5 files changed

+44
-27
lines changed

5 files changed

+44
-27
lines changed

.changeset/nine-days-pretend.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphiql/toolkit': minor
3+
'graphiql': patch
4+
---
5+
6+
Remove `optionalDependencies` entirely, remove `subscriptions-transport-ws` which introduces vulnerabilities, upgrade `@n1ru4l/push-pull-async-iterable-iterator` to 3.0.0, upgrade `graphql-ws` several minor versions - the `[email protected]` upgrade will come in a later minor release.

packages/graphiql-toolkit/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
General purpose library as a dependency of GraphiQL.
66

7-
Part of the GraphiQL 2.0.0 initiative.
7+
A core dependency of the GraphiQL 2.0.0 initiative.
88

99
## Docs
1010

@@ -14,6 +14,6 @@ Part of the GraphiQL 2.0.0 initiative.
1414
## Todo
1515

1616
- [x] Begin porting common type definitions used by GraphiQL and it's dependencies
17-
- [ ] `createFetcher` utility for an easier `fetcher`
17+
- [x] `createGraphiQLFetcher` utility for an easier `fetcher`
1818
- [ ] Migrate over general purpose `graphiql/src/utilities`
1919
- [ ] Utility to generate json schema spec from `getQueryFacts` for monaco, vscode, etc

packages/graphiql-toolkit/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,17 @@
2020
"typings": "dist/index.d.ts",
2121
"scripts": {},
2222
"dependencies": {
23-
"@n1ru4l/push-pull-async-iterable-iterator": "^2.1.4",
24-
"graphql-ws": "^4.3.2",
23+
"@n1ru4l/push-pull-async-iterable-iterator": "^3.0.0",
24+
"graphql-ws": "^4.9.0",
2525
"meros": "^1.1.4"
2626
},
2727
"devDependencies": {
2828
"graphql": "experimental-stream-defer",
2929
"isomorphic-fetch": "^3.0.0",
30-
"subscriptions-transport-ws": "^0.9.18"
31-
},
32-
"optionalDependencies": {
33-
"subscriptions-transport-ws": "^0.9.18"
30+
"subscriptions-transport-ws": "^0.9.19"
3431
},
3532
"peerDependencies": {
36-
"graphql": ">= v14.5.0 <= 15.5.0"
33+
"graphql": ">= v14.5.0 <= 15.6.1"
3734
},
3835
"keywords": [
3936
"graphql",

packages/graphiql/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ GraphiQL provides a React component responsible for rendering the UI, which shou
9090

9191
For HTTP transport implementations, we recommend using the [fetch](https://fetch.spec.whatwg.org/) standard API, but you can use anything that matches [the type signature](https://graphiql-test.netlify.app/typedoc/modules/graphiql-toolkit.html#fetcher), including async iterables and observables.
9292

93-
You can also install `@graphiql/create-fetcher` to make it easier to create a simple fetcher for conventional http and websockets transports.
93+
You can also install `@graphiql/create-fetcher` to make it easier to create a simple fetcher for conventional http and websockets transports. It uses `[email protected]` protocol by default.
9494

9595
```js
9696
import React from 'react';
@@ -109,7 +109,7 @@ ReactDOM.render(
109109
);
110110
```
111111

112-
Read more about using [`createGraphiQLFetcher`](https://github.com/graphql/graphiql/tree/main/packages/graphiql-toolkit/docs/create-fetcher.md) in the readme to learn how to add headers and more.
112+
[Read more about using `createGraphiQLFetcher` in the readme](https://github.com/graphql/graphiql/tree/main/packages/graphiql-toolkit/docs/create-fetcher.md) to learn how to add headers, support the legacy `subsriptions-transport-ws` protocol, and more.
113113

114114
### Usage: UMD Bundle over CDN (Unpkg, JSDelivr, etc)
115115

@@ -259,5 +259,3 @@ In order to theme the editor portions of the interface, you can supply a `editor
259259
editorTheme="solarized light"
260260
/>
261261
```
262-
263-
### Running Operations

yarn.lock

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,10 +2683,10 @@
26832683
call-me-maybe "^1.0.1"
26842684
glob-to-regexp "^0.3.0"
26852685

2686-
"@n1ru4l/push-pull-async-iterable-iterator@^2.1.4":
2687-
version "2.1.4"
2688-
resolved "https://registry.yarnpkg.com/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-2.1.4.tgz#a90225474352f9f159bff979905f707b9c6bcf04"
2689-
integrity sha512-qLIvoOUJ+zritv+BlzcBMePKNjKQzH9Rb2i9W98YXxf/M62Lye8qH0peyiU8yJ1tL0kfulWi31BoK10E6BKJeA==
2686+
"@n1ru4l/push-pull-async-iterable-iterator@^3.0.0":
2687+
version "3.0.0"
2688+
resolved "https://registry.yarnpkg.com/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-3.0.0.tgz#22dc34094c2de5f21b9a798d0ffab16b45de0eb7"
2689+
integrity sha512-gwoIwo/Dt1GOI+lbcG1G7IeRM2K+Fo0op3OGyFJ4tXUCf2a3Q8lUCm81aoevrXC0nu4gbAXeOWy7wWxjpSvZUw==
26902690

26912691
"@nicolo-ribaudo/[email protected]":
26922692
version "2.1.8-no-fsevents"
@@ -9431,10 +9431,10 @@ graphql-config@^3.0.2:
94319431
string-env-interpolation "1.0.1"
94329432
tslib "^2.0.0"
94339433

9434-
graphql-ws@^4.3.2:
9435-
version "4.3.2"
9436-
resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-4.3.2.tgz#c58b03acc3bd5d4a92a6e9f729d29ba5e90d46a3"
9437-
integrity sha512-jsW6eOlko7fJek1iaSGQFj97AWuhexL9A3PuxYtyke/VlMdbSFzmDR4PlPPCTBBskRg6tNRb5RTbBVSd2T60JQ==
9434+
graphql-ws@^4.9.0:
9435+
version "4.9.0"
9436+
resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-4.9.0.tgz#5cfd8bb490b35e86583d8322f5d5d099c26e365c"
9437+
integrity sha512-sHkK9+lUm20/BGawNEWNtVAeJzhZeBg21VmvmLoT5NdGVeZWv5PdIhkcayQIAgjSyyQ17WMKmbDijIPG2On+Ag==
94389438

94399439
graphql@experimental-stream-defer:
94409440
version "15.4.0-experimental-stream-defer.1"
@@ -12528,12 +12528,12 @@ moment@^2.27.0:
1252812528
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
1252912529
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
1253012530

12531-
monaco-editor-webpack-plugin@^1.9.0:
12532-
version "1.9.1"
12533-
resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-1.9.1.tgz#eb4bbb1c5e5bfb554541c1ae1542e74c2a9f43fd"
12534-
integrity sha512-x7fx1w3i/uwZERIgztHAAK3VQMsL8+ku0lFXXbO81hKDg8IieACqjGEa2mqEueg0c/fX+wd0oI+75wB19KJAsA==
12531+
monaco-editor-webpack-plugin@^4.0.0:
12532+
version "4.2.0"
12533+
resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-4.2.0.tgz#2be76cde9cca7bd8c3418503625990f86886927b"
12534+
integrity sha512-/P3sFiEgBl+Y50he4mbknMhbLJVop5gBUZiPS86SuHUDOOnQiQ5rL1jU5lwt1XKAwMEkhwZbUwqaHxTPkb1Utw==
1253512535
dependencies:
12536-
loader-utils "^1.2.3"
12536+
loader-utils "^2.0.0"
1253712537

1253812538
monaco-editor@^0.27.0:
1253912539
version "0.27.0"
@@ -16659,7 +16659,7 @@ stylehacks@^4.0.0:
1665916659
postcss "^7.0.0"
1666016660
postcss-selector-parser "^3.0.0"
1666116661

16662-
[email protected], subscriptions-transport-ws@^0.9.18:
16662+
1666316663
version "0.9.18"
1666416664
resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz#bcf02320c911fbadb054f7f928e51c6041a37b97"
1666516665
integrity sha512-tztzcBTNoEbuErsVQpTN2xUNN/efAZXyCyL5m3x4t6SKrEiTL2N8SaKWBFWM4u56pL79ULif3zjyeq+oV+nOaA==
@@ -16670,6 +16670,17 @@ [email protected], subscriptions-transport-ws@^0.9.18:
1667016670
symbol-observable "^1.0.4"
1667116671
ws "^5.2.0"
1667216672

16673+
subscriptions-transport-ws@^0.9.19:
16674+
version "0.9.19"
16675+
resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.19.tgz#10ca32f7e291d5ee8eb728b9c02e43c52606cdcf"
16676+
integrity sha512-dxdemxFFB0ppCLg10FTtRqH/31FNRL1y1BQv8209MK5I4CwALb7iihQg+7p65lFcIl8MHatINWBLOqpgU4Kyyw==
16677+
dependencies:
16678+
backo2 "^1.0.2"
16679+
eventemitter3 "^3.1.0"
16680+
iterall "^1.2.1"
16681+
symbol-observable "^1.0.4"
16682+
ws "^5.2.0 || ^6.0.0 || ^7.0.0"
16683+
1667316684
success-symbol@^0.1.0:
1667416685
version "0.1.0"
1667516686
resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897"
@@ -18188,6 +18199,11 @@ ws@^5.2.0:
1818818199
dependencies:
1818918200
async-limiter "~1.0.0"
1819018201

18202+
"ws@^5.2.0 || ^6.0.0 || ^7.0.0":
18203+
version "7.5.5"
18204+
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881"
18205+
integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==
18206+
1819118207
ws@^6.0.0, ws@^6.2.1:
1819218208
version "6.2.1"
1819318209
resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb"

0 commit comments

Comments
 (0)