-
Notifications
You must be signed in to change notification settings - Fork 537
feat: support graphql-ws client for GraphiQL IDE #755
Conversation
@acao this is the newly created PR. it looks all recently opened PRs failed on tests running on Node v12. Do you know why? |
@junminstorage not sure, appears to be the same issue on a few PRs and I can’t seem to find the actual error! Looking into it tonight, we will have this and all the subscriptions support docs released by friday at latest |
@acao I think it is something similar to this issue nodejs/undici#702 |
@@ -83,9 +87,10 @@ | |||
"eslint-plugin-istanbul": "0.1.2", | |||
"eslint-plugin-node": "11.1.0", | |||
"express": "4.17.1", | |||
"graphiql": "1.0.6", | |||
"graphiql": "^1.4.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
All of the failing tests for node 12 have the errors |
@justinmchase thank you for approving it. |
I agree it's probably something that can be fixed later. It appears that it would not create a regression. |
276fb99
to
65cbc54
Compare
@junminstorage let me know if there’s anything I can help with here! We will need to get this test passing though. Seems to be an issue with a fixed http mocking utility not being compatible with the latest node 12. Do you think you’ll need any more patches to GraphiQL? |
@junminstorage ok we're good to merge here it looks like! thanks everyone for the awesome work, including @justinmchase for moving things along! |
a note for everyone! with this PR, you should now be able to use websockets with either the legacy or modern another PR must be merged for |
To follow up #687 and continue to address #390, I drafted this PR to
Developer provides
websocketClient
as part ofgraphiql
option, its values are "v0" for subscriptions-transport-ws, "v1" for graphql-ws, I did this based on graphile/crystal#1338, open to better naming suggestion.Specifically check out this tutorial script about how to start web socket server to support subscription using enisdenjo/graphql-ws : https://github.com/junminstorage/graphql-tutorial/blob/master/src/index_v1.js
You can also checkout the two newly added examples inside /examples directory in this PR for usage.