You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to complete a simple SSE example and passed the test using curl, but discovered the following problems while writing the go test case.
I found an unknown bug in client.SSE that will block forever once it is called. This bug appears to be for subscriptions only, as the two test cases in codegen/testserver/singlefile/defer_test.go work normally. I did not find an SSE test case for subscription in the project.
For Example:
server:=handler.New(graph.NewExecutableSchema(graph.Config{
Resolvers: &graph.Resolver{},
}))
server.AddTransport(transport.SSE{})
c:=client.New(server)
sse:=c.SSE(context.Background(), `subscription { onTodoChange { action oldValue { id text done } newValue { id text done } }}`)
// Never get herevarrespanyfmt.Println(sse.Next(&resp), resp)
What happened?
I tried to complete a simple SSE example and passed the test using curl, but discovered the following problems while writing the go test case.
I found an unknown bug in client.SSE that will block forever once it is called. This bug appears to be for subscriptions only, as the two test cases in
codegen/testserver/singlefile/defer_test.go
work normally. I did not find an SSE test case for subscription in the project.For Example:
Complete recurring use cases can be found here https://github.com/o8x/gqlgen/tree/sse-example/_examples/sse
What did you expect?
blocking in the
sse.Next()
methodMinimal graphql.schema and models to reproduce
versions
go run github.com/99designs/gqlgen version
? v0.17.49-devgo version
? go version go1.22.3 darwin/arm64The text was updated successfully, but these errors were encountered: