Last active
October 25, 2021 08:11
-
-
Save Jannis/d16f58984f25717a627336e21464e980 to your computer and use it in GitHub Desktop.
urql + graphql-ws network error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipe( | |
client.subscription(query, variables), | |
subscribe(result => { | |
try { | |
if (result.error) { | |
throw result.error | |
} | |
... | |
} catch (err) { | |
// log the error here | |
} | |
}), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Jannis how did you resolve this issue? I am seeing the same with Hasura and urql