Skip to content

Conversation

jchanke
Copy link

@jchanke jchanke commented Jun 24, 2025

useServer should be imported from the path graphql-ws/use/ws instead of graphql-ws/lib/use/ws, starting from graphql versions 6.0.0 and up.

see enisdenjo/graphql-ws#617

`useServer` should be imported from the path `graphql-ws/use/ws` instead of `graphql-ws/lib/use/ws`, starting from graphql versions 6.0.0 and up.

see enisdenjo/graphql-ws#617
@jchanke jchanke requested review from a team and glasser as code owners June 24, 2025 12:48
@apollo-cla
Copy link

@jchanke: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@jchanke jchanke changed the title Update subscriptions.mdx fix(imports): new path for useServer v6 and up Jun 24, 2025
@codesandbox-ci
Copy link

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.

@glasser
Copy link
Member

glasser commented Jul 2, 2025

Hi, are you sure that's the only change? In addition to another import in the same file, the code shows a few calls to useServer with methods whose options may have changed.

I can try to make the other changes myself but as I don't really actively use this WS support, it's easier to validate when the PR comes from somebody successfully using graphql-ws. Are you able to audit the calls to useServer in the file and update them too?

(We really only have this doc page as a replacement for the fact that we had subscriptions built in way back in Apollo Server v2; at some point we should just delete it and simply have a sentence somewhere noting that graphql-ws exists and is well-documented...)

@glasser glasser changed the title fix(imports): new path for useServer v6 and up docs: new path for useServer v6 and up Jul 2, 2025
@jchanke
Copy link
Author

jchanke commented Jul 3, 2025

Thanks for pointing that out. I'll look into that as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants