Open davidkhanpk opened 3 years ago
I am working with default apollo subscription docs example.
`const { PubSub } = require('graphql-subscriptions'); const pubsub = new PubSub();
newMessage: { subscribe: () => pubsub.asyncIterator([NEW_MESSAGE]), }, `
This code is working just fine on my local server. But on production server i am getting this error Queries and Mutations are working fine on production.
https://ibb.co/0Qh76vC ( photo url for difference between local and production server ) https://ibb.co/g4LSZsH ( photourl for websocket network tab )
On production running nginx with these configurations https://ibb.co/P6zrfM5
For production running digitalocean ubuntu droplet
I am working with default apollo subscription docs example.
`const { PubSub } = require('graphql-subscriptions'); const pubsub = new PubSub();
newMessage: { subscribe: () => pubsub.asyncIterator([NEW_MESSAGE]), }, `
This code is working just fine on my local server. But on production server i am getting this error Queries and Mutations are working fine on production.
{"type":"error","id":"2","payload":{"message":"Subscription field must return Async Iterable. Received: { pubsub: { ee: [EventEmitter], subscriptions: {}, subIdCounter: 0 }, pullQueue: [], pushQueue: [], running: true, allSubscribed: null, eventsArray: [\"NEW_REACTION\"] }."}}
https://ibb.co/0Qh76vC ( photo url for difference between local and production server ) https://ibb.co/g4LSZsH ( photourl for websocket network tab )
On production running nginx with these configurations https://ibb.co/P6zrfM5
For production running digitalocean ubuntu droplet