Skip to content
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

Apollo Subscription Issue with Nginx #233

Open
davidkhanpk opened this issue Sep 25, 2020 · 0 comments
Open

Apollo Subscription Issue with Nginx #233

davidkhanpk opened this issue Sep 25, 2020 · 0 comments

Comments

@davidkhanpk
Copy link

davidkhanpk commented Sep 25, 2020

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

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

No branches or pull requests

1 participant