gqlgen
gqlgen copied to clipboard
How to send a message to a specific subscriber among the subscribers?
Hi everyone. How to send a message to a specific subscriber among the subscribers?
func (r *subscriptionResolver) Message(ctx context.Context) (<-chan string, error) {
randomString := make(chan string, 1)
go func() {
<-ctx.Done()
}()
randomString <- randString(8)
return randomString, nil
}