graphql-dotnet / graphql-dotnet/graphql-client
Testing Subscriptions with Microsoft.AspNetCore.Mvc.Testing
- Dominant language
- C#
- Stars
- 648
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
`GraphQLHttpClient` works really well for writing integration tests for queries and mutations:
```csharp
var client = _factory.CreateClient();
var opts = new GraphQLHttpClientOptions { EndPoint = new Uri(client.BaseAddress!, "graphql") };
Client = new GraphQLHttpClient(opts, new SystemTextJsonSerializer(), client);
```
However it falls short on subscriptions. `GraphQLHttpWebSocket` is internal and does not seem to accept an injected socket or a factory so using it with `_factory.Server.CreateWebSocketClient()` isn't feasible.
It would be great if this were possible
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.