graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.75k stars 732 forks source link

[1.0.1] Subscriptions don't work #136

Closed kbrandwijk closed 6 years ago

kbrandwijk commented 6 years ago

Which makes sense, because you don't know the subscription endpoint. However, subscription is in the intellisense, and a red dot is shown next to the tab header when play is clicked, and clicking play again gives: Cannot read property 'subscribe' of undefined

Also, the subscription endpoint is not accepted: image

I put 'testing your subscriptions' in my Producthunt review, so it would be nice if it actually worked :see_no_evil:

kbrandwijk commented 6 years ago

Ùpdate: not entirely; it turns out that subscriptions without a filter don't work. Adding a filter causes the subscription to run, but then logging is not right: image

kbrandwijk commented 6 years ago

Also, copy-pasting a subscription to a new tab, will cause the same error as in the original description above... image

kbrandwijk commented 6 years ago

Related question, for a non-Graphcool endpoint, how would you know the subscriptions endpoint?

tlvenn commented 6 years ago

Also need to be able to define the initial params that are sent when the websocket is opened which is usually needed to do authentification.

timsuchanek commented 6 years ago

Can you try again? Just fixed this in 1.0.4. Regarding auth: We are taking the same auth headers and inject them to the connctionParams of subscriptions-transport-ws We may, however put this information into the docs. PRs welcome! And reopen of course if still and issue!

benoitgrelard commented 6 years ago

I'm with @kbrandwijk, it seems subscriptions endpoints are somewhat hardcoded to graphcool. I can't seem to be able to play subscriptions from a non-graphcool endpoint. What's the process I should go through?