Replies: 1 comment
-
This looks like an Apollo Client specific question. Sorry, but I don't have any experience with Apollo so I cannot help you out here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Im setting up subscriptions with apollo using SSELink.
We have an express server.
I followed the instructions for the server in the documentation and it works as intended.
For the client side I setup an ApolloLink like instructed in the Recipes
I defined the link this way, but additionally added
singleConnection: true
andonMessage: console.log
.To subscribe, I'm using an apollo useSubscription hook
When I test the "TestSubscription" event with valid data, everything is fine, I get the data passed down to the hook.
However, when I try to propegate an error in the server, in my case returning
testField = undefined
when it can only be of a string type, the response is not sent down to the useSubscription hook.Preferably, we would like to get the error down to the onSubscriptionData options object so we can properly handle an error when it occurs.
Is there some way for me the configure the link so that is passes the error down?
Beta Was this translation helpful? Give feedback.
All reactions