Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support GraphQL subscriptions #2357

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Nov 14, 2024

Important

If your team can benefit from the GraphQL subscriptions support in MSW, please consider sponsoring the project. This will be a big effort, and your contribution will help to see it through. Thank you.

Roadmap

  • Make ws.link support logs: false / quiet: true to disable the default WebSocket handler logging for GraphQL subscriptions (it's an implementation detail).

@kettanaito kettanaito force-pushed the feat/graphql-subscription branch from 761b4ce to eca6e43 Compare November 14, 2024 18:17
@kettanaito kettanaito force-pushed the feat/graphql-subscription branch from eca6e43 to 1ddc187 Compare November 14, 2024 18:21
@kettanaito kettanaito force-pushed the feat/graphql-subscription branch from 403e143 to e24e6db Compare November 15, 2024 17:23
@sutt0n
Copy link

sutt0n commented Nov 15, 2024

img

@kettanaito
Copy link
Member Author

@sutt0n, I do quite share your enthusiasm!

@thearchitector
Copy link

thearchitector commented Feb 26, 2025

is there an update or roadmap here to getting this into a new release, or suggestions on how to mock gql subscriptions in the interm?

@kettanaito
Copy link
Member Author

kettanaito commented Feb 27, 2025

@thearchitector there's a Roadmap section in the description of this PR. It will get populated as I find more things that have to be done before this is ready. So far, it's that one point.

You can follow the PR to see the gist of what GraphQL subscriptions support entails, and how you can use the existing ws.link() API to implement it. I wouldn't recommend that given we have this PR open and you can just install it directly.

There's also a message that you can sponsor this effort if your team needs this API sooner. That will give me the budget to work on it, and you will get the API. Everyone wins. Otherwise, I approach this as I do with all my open source work: when I have time and mood.

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

Successfully merging this pull request may close these issues.

Expose standardGraphQLHandlers to type graphql.link Support GraphQL subscriptions
4 participants