NestJs with Graphql not working #102
Unanswered
douglasgomes98
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hey there. The error is not related to graphql-sse, your subscriptions implementation is not working. I am not very familiar with NestJS, but can you maybe try changing the subscription publish like this? - await pubsub.publish(topic, { id, message });
+ await pubsub.publish(topic, { receiveMessage: { id, message } }); |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Screenshot
![Screenshot 2024-07-16 at 11 20 20](https://private-user-images.githubusercontent.com/47008462/349129551-07bebfaa-dc5f-493b-ae9c-adc396130c95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMzQ1MzYsIm5iZiI6MTczOTMzNDIzNiwicGF0aCI6Ii80NzAwODQ2Mi8zNDkxMjk1NTEtMDdiZWJmYWEtZGM1Zi00OTNiLWFlOWMtYWRjMzk2MTMwYzk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA0MjM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyNDUwZTdlZDI5MDI2ZDI5MmZlNWU1MTkxODgyZTFmMGIxYThmMWQzMTMzZmI5MzBhODZlZDljNzc4MTUyOTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5g8OeDIGZlL5YJb2KMBdbWw7mLEZWWgO2x9jZCF1WlY)
Visualising is always helpful.
https://codesandbox.io/p/github/douglasgomes98/nest-graphq-sse/main
I created a codesandox to help with reproduction.
By default, NestJs uses express as a server and I'm using Apollo Graphql
Beta Was this translation helpful? Give feedback.
All reactions