Skip to content

Commit

Permalink
fix: remove type definition from vulnerable library (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Oct 28, 2021
1 parent 8ad2c0c commit 62e786b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/blue-eggs-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'graphiql': patch
'@graphiql/toolkit': patch
---

Remove type definition from `subscriptions-transport-ws`
7 changes: 3 additions & 4 deletions packages/graphiql-toolkit/src/create-fetcher/lib.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DocumentNode, visit, GraphQLError } from 'graphql';
import { meros } from 'meros';
import { createClient, Client, ClientOptions } from 'graphql-ws';
import { SubscriptionClient } from 'subscriptions-transport-ws';
import {
isAsyncIterable,
makeAsyncIterableIteratorFromSink,
Expand Down Expand Up @@ -116,9 +115,9 @@ export const createWebsocketsFetcherFromClient = (wsClient: Client) => (
}),
);

export const createLegacyWebsocketsFetcher = (
legacyWsClient: SubscriptionClient,
) => (graphQLParams: FetcherParams) => {
export const createLegacyWebsocketsFetcher = (legacyWsClient: {
request: (params: FetcherParams) => unknown;
}) => (graphQLParams: FetcherParams) => {
const observable = legacyWsClient.request(graphQLParams);
return makeAsyncIterableIteratorFromSink<FetcherResult>(
// @ts-ignore
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3288,7 +3288,7 @@
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==

"@graphiql/toolkit@file:packages/graphiql-toolkit":
version "0.2.2"
version "0.3.0"
dependencies:
"@n1ru4l/push-pull-async-iterable-iterator" "^3.0.0"
graphql-ws "^4.9.0"
Expand Down Expand Up @@ -11512,15 +11512,15 @@ grapheme-splitter@^1.0.4:
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==

"graphiql@file:packages/graphiql":
version "1.4.2"
version "1.4.3"
dependencies:
"@graphiql/toolkit" "^0.2.0"
"@graphiql/toolkit" "^0.3.0"
codemirror "^5.58.2"
codemirror-graphql "^1.0.0"
copy-to-clipboard "^3.2.0"
dset "^3.1.0"
entities "^2.0.0"
graphql-language-service "^3.1.2"
graphql-language-service "^3.1.5"
markdown-it "^10.0.0"

graphql-config@^3.0.2:
Expand Down

0 comments on commit 62e786b

Please sign in to comment.