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
Hi all,
I have a remote WebSocket server which I am wrapping into a subscription using gqlGen, Does anyone have any ideas on how I can achieve this?
Currently, I am using Gorilla Websocket, created in the subscription Resolver. The snippet is below.
UI is using Apollo Client.
Now when I comment <-ctx.Done() block , it works but when subscription breaks from UI, it wont clear off.
If I don't comment it done, it is getting deleted once the message is received.
Let me know the correct way of doing it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I have a remote WebSocket server which I am wrapping into a subscription using gqlGen, Does anyone have any ideas on how I can achieve this?
Currently, I am using Gorilla Websocket, created in the subscription Resolver. The snippet is below.
UI is using Apollo Client.
Now when I comment
<-ctx.Done()
block , it works but when subscription breaks from UI, it wont clear off.If I don't comment it done, it is getting deleted once the message is received.
Let me know the correct way of doing it.
`func (r *subscriptionResolver) Repo(ctx context.Context, id model.Long, cid []*model.Long) (<-chan *model.Repo, error) {
token := id.String() + ":" + strconv.Itoa(rand.Int())
Beta Was this translation helpful? Give feedback.
All reactions