Describe the bug
When I try a subscription in the playground, i get the following
{
"error": "Could not connect to websocket endpoint wss://my-heroku-instance.herokuapp.com/server-prisma-heroku/dev. Please check if the endpoint url is correct."
}
My queries and mutations are working fine at the same endpoint.
What could be the issue for subscriptions?
Versions (please complete the following information):
OS X High Sierraprisma CLI: [email protected] node-v10.12.0Additional context
My instance is deployed in heroku using the installer options from prisma website.
Any update on this issue?
@morpherious Currently heroku doesnt seem to allow websockets on . container deploy. You will require to host your prisma server somewhere else.
Closing this as it is not related to prisma. It is related to Heroku and we really can't do a fix there ;)
So I'd like to take a stab at clarifying the issue, because I imagine there are a lot of people who've been guided by Prisma Cloud to deploy on Heroku and then hit this dead end buried in GitHub issues. Some messaging about this limitation is really important.
EDIT: May have gotten previous information wrong.
Is the real issue here predominantly that Heroku only exposes one ${PORT} variable and doesn't allow the EXPOSE dockerfile directive?
Hey I'm having the same issue here... Where Can I deploy?? Stresseddddddd
Hey I'm having the same issue here... Where Can I deploy?? Stresseddddddd
@nugoo1 You can get around this if you're okay with publishing messages from your node API server instead of relying on Prisma server's subscriptions, as they have done here Subscription example. This relies on your mutations publishing an event each time they succeed, but it doesn't allow you to dynamically query the data, resulting from the mutation, in the subscription operation.
Helloioo, Heroku doez support wss now and working beautifully! Thanks for the reply AWebofBrown, I had used ws instead of wss which was the problem,, my bad.. Need wss if u have https
Most helpful comment
@morpherious Currently heroku doesnt seem to allow websockets on . container deploy. You will require to host your prisma server somewhere else.