Tool to Test GraphQL Subscriptions

Given the discussion I saw around this question, I thought it would be useful to transfer over to The Club for future searching :grin:

Looking for a tool to test GraphQL subscriptions, something like Postman or Insomnia. Or even just a GraphiQL equivalent (can’t use GraphiQL at the moment, Charles is useful but not quite what I want here). Anyone know anything Mac friendly? or Linux friendly? It is unsupported by Postman to the best of my knowledge.

Two tools suggested for this by the OP were:

Another person in the thread suggested

I ended up making my own a while back. There’s some open source libraries for it, but it requires a language that supports parallelism, and the libraries out there aren’t super great (but they were good as a starting point). The biggest hang up I found (if it helps), was the inclusion of a “subprotocol” header. I forget what it was exactly, but it was a reference to graphql in some way, and without it, the graphql service just ignored the connection.

My implementation had a websocket connection “manager” that operated in its own thread, and as messages came in, it parsed them, determined the type of message, and put the core of the message in a sort of queue for the relevant message type (I used lists, and it was in Python, so I could easily reference the last added message with an index of -1). Then I built an interface around this that provided methods to wait for new messages of particular types to come in, to get those messages, and to send messages back. My other code could then just tap into this interface to work with the subscription asynchronously.

Is this something that you have tried? What tool or implementation did/do you use?