From 35e55f0a3ff04d1ee6544169e7f2aadd5cd91d43 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 23:04:28 +0000 Subject: [PATCH 1/2] fix(deps): update dependency graphql-ws to v6 --- examples/gnt/package.json | 2 +- internal/test-utils/package.json | 2 +- packages/gqty/package.json | 4 ++-- packages/react/package.json | 4 ++-- pnpm-lock.yaml | 35 ++++++++++++++++++++++++-------- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/examples/gnt/package.json b/examples/gnt/package.json index 4afac293e..6a9aa8ee2 100644 --- a/examples/gnt/package.json +++ b/examples/gnt/package.json @@ -15,7 +15,7 @@ "@nhost/nextjs": "^2.2.3", "gqty": "workspace:^", "graphql": "^16.10.0", - "graphql-ws": "^5.16.2", + "graphql-ws": "^6.0.3", "next": "15.1.7", "react": "^18.3.1", "react-dom": "^18.3.1" diff --git a/internal/test-utils/package.json b/internal/test-utils/package.json index 0eb7569b4..43219ce71 100644 --- a/internal/test-utils/package.json +++ b/internal/test-utils/package.json @@ -45,7 +45,7 @@ "graphql": "^16.10.0", "graphql-ez": "^0.16.1", "graphql-scalars": "^1.24.1", - "graphql-ws": "^5.16.2", + "graphql-ws": "^6.0.3", "graphql-yoga": "^5.11.0", "jest": "^29.7.0", "jest-watch-typeahead": "^2.2.2", diff --git a/packages/gqty/package.json b/packages/gqty/package.json index 4e94f5c36..205e1e341 100644 --- a/packages/gqty/package.json +++ b/packages/gqty/package.json @@ -93,7 +93,7 @@ "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0", "graphql": "^16.10.0", "graphql-sse": "^2.5.4", - "graphql-ws": "^5.16.2", + "graphql-ws": "^6.0.3", "jest": "^30.0.0-alpha.7", "just-memoize": "^2.2.0", "p-lazy": "^3.1.0", @@ -106,7 +106,7 @@ "peerDependencies": { "graphql": "*", "graphql-sse": "^2.5.4", - "graphql-ws": "^5.16.2" + "graphql-ws": "^6.0.3" }, "peerDependenciesMeta": { "graphql": { diff --git a/packages/react/package.json b/packages/react/package.json index 17bb6414a..8cc07b1bc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -109,7 +109,7 @@ "gqty": "workspace:^", "graphql": "^16.10.0", "graphql-sse": "^2.5.4", - "graphql-ws": "^5.16.2", + "graphql-ws": "^6.0.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "lodash-es": "^4.17.21", @@ -124,7 +124,7 @@ "gqty": "workspace:^3.4.1", "graphql": "*", "graphql-sse": "^2.5.4", - "graphql-ws": "^5.16.2", + "graphql-ws": "^6.0.3", "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66d273f93..7791cd722 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,8 +102,8 @@ importers: specifier: ^16.10.0 version: 16.10.0 graphql-ws: - specifier: ^5.16.2 - version: 5.16.2(graphql@16.10.0) + specifier: ^6.0.3 + version: 6.0.3(graphql@16.10.0)(ws@8.18.0) next: specifier: 15.1.7 version: 15.1.7(@babel/core@7.26.8)(react-dom@18.3.1)(react@18.3.1) @@ -409,8 +409,8 @@ importers: specifier: ^1.24.1 version: 1.24.1(graphql@16.10.0) graphql-ws: - specifier: ^5.16.2 - version: 5.16.2(graphql@16.10.0) + specifier: ^6.0.3 + version: 6.0.3(graphql@16.10.0)(ws@8.18.0) graphql-yoga: specifier: ^5.11.0 version: 5.11.0(graphql@16.10.0) @@ -599,8 +599,8 @@ importers: specifier: ^2.5.4 version: 2.5.4(graphql@16.10.0) graphql-ws: - specifier: ^5.16.2 - version: 5.16.2(graphql@16.10.0) + specifier: ^6.0.3 + version: 6.0.3(graphql@16.10.0)(ws@8.18.0) jest: specifier: ^30.0.0-alpha.7 version: 30.0.0-alpha.7(@types/node@22.13.1)(ts-node@10.9.2) @@ -729,8 +729,8 @@ importers: specifier: ^2.5.4 version: 2.5.4(graphql@16.10.0) graphql-ws: - specifier: ^5.16.2 - version: 5.16.2(graphql@16.10.0) + specifier: ^6.0.3 + version: 6.0.3(graphql@16.10.0)(ws@8.18.0) jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.13.1)(ts-node@10.9.2) @@ -9393,6 +9393,25 @@ packages: dependencies: graphql: 16.10.0 + /graphql-ws@6.0.3(graphql@16.10.0)(ws@8.18.0): + resolution: {integrity: sha512-mvLRHihMg0llF74vo16063HufZHMGaiMxAjzyj0ARYueIikGzj1khlbPNl7vUc2h9rxbq9pGpQYbqypgq1fAXA==} + engines: {node: '>=20'} + peerDependencies: + '@fastify/websocket': ^10 || ^11 + graphql: ^15.10.1 || ^16 + uWebSockets.js: ^20 + ws: ^8 + peerDependenciesMeta: + '@fastify/websocket': + optional: true + uWebSockets.js: + optional: true + ws: + optional: true + dependencies: + graphql: 16.10.0 + ws: 8.18.0(bufferutil@4.0.9) + /graphql-yoga@5.11.0(graphql@16.10.0): resolution: {integrity: sha512-zyeXE79hKBzEvb/jYK3bnouoPsNNtv+pyNR6BeMHyeGmavimSvi1LH3vqSlh1sjxUTMXZu715X0L4T8RrexCcA==} engines: {node: '>=18.0.0'} From 6648ee965091e6ea6838846f3c286b30b29043f6 Mon Sep 17 00:00:00 2001 From: Vicary A Date: Wed, 12 Feb 2025 08:58:03 +0800 Subject: [PATCH 2/2] fix(package/gqty): type error --- packages/gqty/src/Client/resolvers.ts | 7 ++++++- packages/gqty/src/Client/subscriber.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/gqty/src/Client/resolvers.ts b/packages/gqty/src/Client/resolvers.ts index 8068b9659..7814913da 100644 --- a/packages/gqty/src/Client/resolvers.ts +++ b/packages/gqty/src/Client/resolvers.ts @@ -376,7 +376,12 @@ export const createResolvers = ({ cache: context.cache, debugger: debug, extensions, - fetchOptions: { ...fetchOptions, cachePolicy, retryPolicy }, + fetchOptions: { + ...fetchOptions, + cachePolicy, + retryPolicy, + subscriber, + }, operationName, }); diff --git a/packages/gqty/src/Client/subscriber.ts b/packages/gqty/src/Client/subscriber.ts index 19a78c1a8..b7ae3b05a 100644 --- a/packages/gqty/src/Client/subscriber.ts +++ b/packages/gqty/src/Client/subscriber.ts @@ -15,7 +15,7 @@ export type GQtyWsClient = WsClient & { }; /** - * Warning: If the WebSocket is already connected before this funciton is + * Warning: If the WebSocket is already connected before this function is * called, the `onSubscribe` will not be called until next connected event. */ export const createSubscriber = (input: WsClient): GQtyWsClient => {