Search code examples
graphqlsubscriptionsapollo-clientgraphql-subscriptions

Unhandled GraphQL Subscription error


I am using apollo client with the additional module subscriptions-transport-ws and graphql on the server.

When a graphql error happens on the server, kind of cannot return null for non-nullable... the Browser tells me that there is a apollo has a "Unhandled GraphQL subscription errror".

How does the error handling for subscriptions on the client side work?


Solution

  • If you are asking how to get the error to report then just add ,onError: err => console.error(err) below the updateQuery in your subscription and it reports errors. If you are asking how it all works then that's beyond me, sorry.