-
I have a subscription that takes arguments. If the arguments are bad I want to communicate that.
I was thinking it might be best to send an error message instead of disconnecting then completing but I don't know what's the easiest to use as a client. What's the guidance here? |
Beta Was this translation helpful? Give feedback.
Answered by
enisdenjo
Aug 21, 2021
Replies: 1 comment 4 replies
-
You may gracefully error out a specific subscription in two ways:
Whichever way you choose, the returned errors will be transmitted to the client through the |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
reconbot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may gracefully error out a specific subscription in two ways:
GraphQLErrors
in theonSubscribe
optionvalidate
functionWhichever way you choose, the returned errors will be transmitted to the client through the
Error
message and end the subscription keeping the connection alive.