Closed junminstorage closed 3 years ago
@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 https://github.com/nodejs/undici/issues/702
All of the failing tests for node 12 have the errors DeprecationWarning: The legacy HTTP parser is deprecated.
@justinmchase thank you for approving it. right, it is documented here: https://github.com/graphql/express-graphql/issues/756. @acao is it possible to continue to merge this PR and release it?
I agree it's probably something that can be fixed later. It appears that it would not create a regression.
@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!
@acao I fixed the mocha issue as stated in #762 , this PR is ready to go.
a note for everyone!
with this PR, you should now be able to use websockets with either the legacy or modern graphql-ws
transport spec!
another PR must be merged for @stream
and @defer
support to become stable:
https://github.com/graphql/graphql-js/pull/2839
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/postgraphile#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.