I can't seem to get graphql subscriptions to work with the graphql
gem and ActionCable 6.
The schema is able to be introspected and the following query:
subscription buildSub($buildUuid:String!) {
build(uuid:$buildUuid) {
uuid
status
success
lastModified
}
}
returns correctly in GraphiQL, but it uses controller, not the channel.
When I run the same query in GraphQL playground, it returns:
{
"error": "Could not connect to websocket endpoint ws://localhost:3030/graphql. Please check if the endpoint url is correct."
}
And I get the following in my rails logs
Started GET "/graphql" for ::1 at 2019-08-29 14:36:22 -0600
Started GET "/graphql/" [WebSocket] for ::1 at 2019-08-29 14:36:22 -0600
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Finished "/graphql/" [WebSocket] for ::1 at 2019-08-29 14:36:22 -0600