Skip to content

Update part8e.md #4075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: source
Choose a base branch
from
Open

Update part8e.md #4075

wants to merge 1 commit into from

Conversation

jchanke
Copy link

@jchanke jchanke commented Jun 24, 2025

fix a pubsub method that's been renamed.

a newer version of the PubSub class from graphql-subscriptions defines the method PubSub.asyncIterableIterator instead of PubSub.asyncIterator.

see https://stackoverflow.com/questions/79302579/pubsub-error-property-asynciterator-does-not-exist-on-type-pubsubrecordstr.

i've used the code in my codebase and it works!

for reference:

"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"
      }

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"
      }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant