Skip to content

Instantly share code, notes, and snippets.

@Jannis
Last active October 25, 2021 08:11
Show Gist options
  • Save Jannis/d16f58984f25717a627336e21464e980 to your computer and use it in GitHub Desktop.
Save Jannis/d16f58984f25717a627336e21464e980 to your computer and use it in GitHub Desktop.
urql + graphql-ws network error
pipe(
client.subscription(query, variables),
subscribe(result => {
try {
if (result.error) {
throw result.error
}
...
} catch (err) {
// log the error here
}
}),
)
{
"type": "b",
"message": "[Network] undefined",
"name": "CombinedError",
"graphQLErrors": [],
"networkError": {
"target": {
"_events": {},
"_eventsCount": 4,
"_binaryType": "nodebuffer",
"_closeCode": 1006,
"_closeFrameReceived": false,
"_closeFrameSent": false,
"_closeMessage": "",
"_closeTimer": null,
"_extensions": {},
"_protocol": "",
"_readyState": 3,
"_receiver": null,
"_sender": null,
"_socket": null,
"_bufferedAmount": 0,
"_isServer": false,
"_redirects": 0,
"_url": "ws://gateway-agent.default.svc.cluster.local:6702",
"_req": null
},
"type": "close",
"wasClean": false,
"reason": "",
"code": 1006
}
}
@dohomi
Copy link

dohomi commented Oct 25, 2021

@Jannis how did you resolve this issue? I am seeing the same with Hasura and urql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment