diff --git a/api/package.json b/api/package.json index 54c729729..c6d5574eb 100644 --- a/api/package.json +++ b/api/package.json @@ -99,7 +99,7 @@ "graphql": "^16.9.0", "graphql-fields": "^2.0.3", "graphql-scalars": "^1.23.0", - "graphql-subscriptions": "^2.0.0", + "graphql-subscriptions": "^3.0.0", "graphql-tag": "^2.12.6", "graphql-type-json": "^0.3.2", "graphql-type-uuid": "^0.2.0", diff --git a/api/src/core/pubsub.ts b/api/src/core/pubsub.ts index a3d5aabf5..ea0cf320d 100644 --- a/api/src/core/pubsub.ts +++ b/api/src/core/pubsub.ts @@ -28,5 +28,5 @@ export const pubsub = new PubSub({ eventEmitter }); * @param channel The pubsub channel to subscribe to. */ export const createSubscription = (channel: PUBSUB_CHANNEL) => { - return pubsub.asyncIterator(channel); + return pubsub.asyncIterableIterator(channel); }; diff --git a/api/src/graphql/schema/utils.ts b/api/src/graphql/schema/utils.ts index cc86c874a..cee23d8e4 100644 --- a/api/src/graphql/schema/utils.ts +++ b/api/src/graphql/schema/utils.ts @@ -68,7 +68,7 @@ export const createSubscription = (channel: string, resource?: string) => ({ }); hasSubscribedToChannel(context.websocketId, channel); - return pubsub.asyncIterator(channel); + return pubsub.asyncIterableIterator(channel); }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cd161e01..916a1e3f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -168,8 +168,8 @@ importers: specifier: ^1.23.0 version: 1.24.1(graphql@16.10.0) graphql-subscriptions: - specifier: ^2.0.0 - version: 2.0.0(graphql@16.10.0) + specifier: ^3.0.0 + version: 3.0.0(graphql@16.10.0) graphql-tag: specifier: ^2.12.6 version: 2.12.6(graphql@16.10.0) @@ -3898,6 +3898,7 @@ packages: '@unraid/libvirt@1.1.3': resolution: {integrity: sha512-aZNHkwgQ/0e+5BE7i3Ru4GC3Ev8fEUlnU0wmTcuSbpN0r74rMpiGwzA/4cqIJU8X+Kj//I80pkUufzXzHmMWwQ==} engines: {node: '>=14'} + cpu: [x64, arm64] os: [linux, darwin] '@unraid/tailwind-rem-to-rem@1.1.0': @@ -6963,8 +6964,8 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - graphql-subscriptions@2.0.0: - resolution: {integrity: sha512-s6k2b8mmt9gF9pEfkxsaO1lTxaySfKoEJzEfmwguBbQ//Oq23hIXCfR1hm4kdh5hnR20RdwB+s3BCb+0duHSZA==} + graphql-subscriptions@3.0.0: + resolution: {integrity: sha512-kZCdevgmzDjGAOqH7GlDmQXYAkuHoKpMlJrqF40HMPhUhM5ZWSFSxCwD/nSi6AkaijmMfsFhoJRGJ27UseCvRA==} peerDependencies: graphql: ^15.7.2 || ^16.0.0 @@ -9483,6 +9484,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qs@6.13.0: @@ -18931,10 +18933,9 @@ snapshots: graphql: 16.10.0 tslib: 2.8.1 - graphql-subscriptions@2.0.0(graphql@16.10.0): + graphql-subscriptions@3.0.0(graphql@16.10.0): dependencies: graphql: 16.10.0 - iterall: 1.3.0 graphql-tag@2.12.6(graphql@16.10.0): dependencies: