keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Adds a GraphQL Subscription using WebSocketServer example

Open borisno2 opened this issue 3 years ago • 4 comments

Adds an example of extending the HTTP server and the GraphQL Schema to add a WebSocketServer using ws in order to add Subscriptions to GraphQL using graphql-ws/lib/use/ws

This PR also enables the extendHttpServer function when using keystone dev - previously this only worked when running keystone start.

To note currently the extendHttpServer function does not update the running HTTP server in dev when the express and apollo are restarted in hot reload, if something is updated that impacts the extendHttpServer function keystone will need to be manually stopped and restarted.

References

Asked about in https://keystonejs.slack.com/archives/C01STDMEW3S/p1634110649362800

borisno2 avatar Jul 18 '22 02:07 borisno2

🦋 Changeset detected

Latest commit: 8f85fb77ac2917bd0446bf9a16897c928c44f91d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@keystone-6/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jul 18 '22 02:07 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
keystone-next-docs ✅ Ready (Inspect) Visit Preview Aug 15, 2022 at 3:25AM (UTC)

vercel[bot] avatar Jul 18 '22 02:07 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8f85fb77ac2917bd0446bf9a16897c928c44f91d:

Sandbox Source
@keystone-6/sandbox Configuration

codesandbox-ci[bot] avatar Jul 18 '22 05:07 codesandbox-ci[bot]

Wooot, wooot!!! #hyped !! 🤩

ScottAgirs avatar Jul 25 '22 00:07 ScottAgirs