Help getting subscriptions working #1390
Unanswered
robinelvin
asked this question in
Q&A
Replies: 1 comment
-
Further to the above, if I add a second test this sometimes passes and I see the log of the subscription resolver for the event. Adding a third test also sometimes passes but I only ever see 2 events and not the 3 emitted. The tests are intermittent and often time out on repeated runs even if the subscription resolver is fired. I'm not sure if this is my tests, TypeGraphQL, or something to do with the Redis iterator. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to add subscriptions to my schema and test them before enabling in production. I am using
graphql-redis-subscriptions
and I am passing in a sharedpubSub
object into mybuildSchema
call. I can subscribe using thepubSub.subscribe
method and when I usepubSub.publish
I get the message. Next I am trying to subscribe using a GraphQL subscription query. The subscription fires thetopics
method on the@Subscription
decorator and I can confirm the topic is being passed correctly. The problem is I fire thepubSub.publish
as before and I get nothing. The test just times out and the resolver method is never called. I have used both thesubscribe
method from thegraphql
package and tried wiring up a websocket server. What am I missing?Beta Was this translation helpful? Give feedback.
All reactions