Smart Subscriptions Plugin: How do I implement smartSubscription if my PubSub class isn't AsyncIterator based? #643
Unanswered
NicolasNewman
asked this question in
Q&A
Replies: 1 comment 2 replies
-
the yoga pubsub.subscribe method returns an async iterator smartSubscriptions: {
...subscribeOptionsFromIterator((name, { pubSub }) => {
return pubSub.subscribe(name);
}),
}, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using Pothos with a NextJS application using GraphQL-Yoga as a server and Apollo for the client. I'm currently able to use
graphql-subscriptions
PubSub class but I'd prefer to use the one built into Yoga. My main roadblock is when I instantiate the SchemaBuilder I'm not sure how to convert:to an equivalent version with Yoga as their PubSub implementation doesn't use asyncIterators. Yoga's PubSub documentation can be found here and their implementation can be found here
I'd greatly appreciate any help / guidance!
Beta Was this translation helpful? Give feedback.
All reactions