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

Integration Testing for Subscriptions #4113

Closed
andrewphillipo opened this issue May 14, 2020 · 2 comments
Closed

Integration Testing for Subscriptions #4113

andrewphillipo opened this issue May 14, 2020 · 2 comments

Comments

@andrewphillipo
Copy link

andrewphillipo commented May 14, 2020

Am I correct in saying that apollo-server-testing currently does not support subscriptions into a graphql server? It would be really useful to support this; subscriptions are things that feel quite brittle and prone to people accidentally breaking them as they are transient - i.e. if you receive a notification it should change the UI under that even not before, so it is not immedately apparent that you have broken something. Maybe I'm misunderstanding but how do I go about writing integration tests in the same way as for mutation and query?

The expected behavior is I should be able to create a subscription that can be mocked with apollo-server-testing, event fired from it and I should receive the mocked notification/subscription event in my components.

I guess this is somewhat of a feature request! Thanks for the amazing work you guys do on Apollo!

@upforpatrick
Copy link

This would be nice

@glasser
Copy link
Member

glasser commented Oct 3, 2022

Direct subscriptions integration was removed from Apollo Server in v3 last year. (Partially because of how the old flimsy integration led to problems like this one.)

@glasser glasser closed this as completed Oct 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants