-
Notifications
You must be signed in to change notification settings - Fork 134
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
Testable Subscriptions with compatibility for TestServer #354
Comments
Hi, I agree the current setup for integration-testing against a webserver setup is not elegant. I'd love to see an elegant solution to this. Please go ahead and prove your concept in the integration tests project. |
Hi rose-a, I'm glad you like the idea, will prepare the PR for your review this week. |
I'm actually hoping for improved stability on the integration test through this, too (see #161). 😉 |
I already spotted this issue locally, not sure about its nature yet. But it happens both for TestServer and the real server. |
Submitted #357 |
Thanks for your work, I'll try to review this over the weekend... |
@rose-a should I provide more explanations or details to help you out a bit? |
I'm really sorry, but I didn't get around to this yet... It's still on my To-Do list though. |
Any updates, @rose-a? One year gone ) |
I'm facing the same issue. It is very inconvenient not be able to use the GraphQL client properly in the tests. Is there any news? |
Hi, any update on this one, @rose-a? Proper support for TestServer would be of great benefit for the community. |
Any updates on this? 🙏 |
No updates on this yet, as I am very limited on time myself. |
Hello everybody,
I'm using graphql-dotnet project a lot and would like to thank you for the amazing product you build for the whole .Net community.
My company is building GraphQl-first services and relies a lot on integration testing with TestServer.
graphql-client Queries and Mutations work fine with TestServer because it is possible to pass an IHttpClient instance into GraphQlHttpClient constructor.
But for subscription, there is no way to pass WebSocket from TestServer due to the not-configurable creation of ClientWebSocket at
graphql-client/src/GraphQL.Client/Websocket/GraphQLHttpWebSocket.cs
Line 403 in b366e22
My suggestion is to add a new constructor
to get better control over WebSocket creation.
It would also allow moving condition compilation logic '#if NETFRAMEWORK' out of the GraphQLHttpWebSocket class later on, making it cleaner.
I see a lot of value in supporting subscriptions for TestServer. Our particular scenario is to issue asynchronous mutations and wait for some delayed effect via subscription.
What do you think about such a suggestion?
If you find this idea worthy, I can prepare a PR for your review and further discussion.
The text was updated successfully, but these errors were encountered: