We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can't return an error that occurred in the other goroutine. For example, redis-pubsub, gRPC client streaming, etc.
I want to return an error after returning a channel.
type Subscription { messageAdded: Message! } type Message { id: ID! body: String! }
func (r *subscriptionResolver) MessageAdded(ctx context.Context) (<-chan *model.Message, error) { ch := make(chan *model.Message) go func() { // some kind of block processing (e.g.: gRPC client streaming) stream, err := gRPCClientStreamRequest(ctx) if err != nil { log.Println(err) // i want to return this error } for { m, err := stream.Recv() if err != nil { log.Println(err) // i want to return this error } ch <- m } }() return ch, nil }
gqlgen version
go version
dep or go modules
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
Can't return an error that occurred in the other goroutine.
For example, redis-pubsub, gRPC client streaming, etc.
What did you expect?
I want to return an error after returning a channel.
Minimal graphql.schema and models to reproduce
versions
gqlgen version
: 0.11.3go version
: 1.13dep or go modules
: go modulesThe text was updated successfully, but these errors were encountered: