From 30e34056499e6b5b57f14f79047fdc77d8055c9d Mon Sep 17 00:00:00 2001 From: Joseph Chan Date: Tue, 24 Jun 2025 09:10:29 -0400 Subject: [PATCH] Update part8e.md a newer version of the `PubSub` class from `graphql-subscriptions` defines the method `PubSub.asyncIterableIterator` instead of `PubSub.asyncIterator`. i've used the code in my codebase and it works! for reference: ```config "dependencies": { "@apollo/server": "^4.12.2", "@as-integrations/express5": "^1.1.0", "@graphql-tools/schema": "^10.0.23", "bcrypt": "^6.0.0", "cors": "^2.8.5", "dotenv": "^16.5.0", "express": "^5.1.0", "graphql": "^16.11.0", "graphql-subscriptions": "^3.0.0", "graphql-ws": "^6.0.5", "json-web-token": "^3.2.0", "jsonwebtoken": "^9.0.2", "mongoose": "^7.8.7", "mongoose-unique-validator": "^4.0.1", "ws": "^8.18.2" } ``` --- src/content/8/en/part8e.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/8/en/part8e.md b/src/content/8/en/part8e.md index 3c610469af1..fb9c58af7f2 100644 --- a/src/content/8/en/part8e.md +++ b/src/content/8/en/part8e.md @@ -589,7 +589,7 @@ const resolvers = { // highlight-start Subscription: { personAdded: { - subscribe: () => pubsub.asyncIterator('PERSON_ADDED') + subscribe: () => pubsub.asyncIterableIterator('PERSON_ADDED') }, }, // highlight-end