Skip to content

Commit 62e786b

Browse files
authored
fix: remove type definition from vulnerable library (#1990)
1 parent 8ad2c0c commit 62e786b

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.changeset/blue-eggs-tease.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'graphiql': patch
3+
'@graphiql/toolkit': patch
4+
---
5+
6+
Remove type definition from `subscriptions-transport-ws`

packages/graphiql-toolkit/src/create-fetcher/lib.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { DocumentNode, visit, GraphQLError } from 'graphql';
22
import { meros } from 'meros';
33
import { createClient, Client, ClientOptions } from 'graphql-ws';
4-
import { SubscriptionClient } from 'subscriptions-transport-ws';
54
import {
65
isAsyncIterable,
76
makeAsyncIterableIteratorFromSink,
@@ -116,9 +115,9 @@ export const createWebsocketsFetcherFromClient = (wsClient: Client) => (
116115
}),
117116
);
118117

119-
export const createLegacyWebsocketsFetcher = (
120-
legacyWsClient: SubscriptionClient,
121-
) => (graphQLParams: FetcherParams) => {
118+
export const createLegacyWebsocketsFetcher = (legacyWsClient: {
119+
request: (params: FetcherParams) => unknown;
120+
}) => (graphQLParams: FetcherParams) => {
122121
const observable = legacyWsClient.request(graphQLParams);
123122
return makeAsyncIterableIteratorFromSink<FetcherResult>(
124123
// @ts-ignore

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,7 +3288,7 @@
32883288
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==
32893289

32903290
"@graphiql/toolkit@file:packages/graphiql-toolkit":
3291-
version "0.2.2"
3291+
version "0.3.0"
32923292
dependencies:
32933293
"@n1ru4l/push-pull-async-iterable-iterator" "^3.0.0"
32943294
graphql-ws "^4.9.0"
@@ -11512,15 +11512,15 @@ grapheme-splitter@^1.0.4:
1151211512
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
1151311513

1151411514
"graphiql@file:packages/graphiql":
11515-
version "1.4.2"
11515+
version "1.4.3"
1151611516
dependencies:
11517-
"@graphiql/toolkit" "^0.2.0"
11517+
"@graphiql/toolkit" "^0.3.0"
1151811518
codemirror "^5.58.2"
1151911519
codemirror-graphql "^1.0.0"
1152011520
copy-to-clipboard "^3.2.0"
1152111521
dset "^3.1.0"
1152211522
entities "^2.0.0"
11523-
graphql-language-service "^3.1.2"
11523+
graphql-language-service "^3.1.5"
1152411524
markdown-it "^10.0.0"
1152511525

1152611526
graphql-config@^3.0.2:

0 commit comments

Comments
 (0)