You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to understand if it is possible to use this library to assert on error responses from a resolver. My use case is:
I have a resolver which calls an upstream process, if that process throws an error, then my resolver throws an ApolloError. I want to be able to test that an ApolloError has been thrown under the correct conditions.
The problem I have at the moment is that this library throws it's own error because the response is not in a shape it expects for a successful response, e.g.
Expected Iterable, but did not find one for field "Query.fieldName".
The text was updated successfully, but these errors were encountered:
Having had a look through the code, it appears that if the subgraph response includes the errors property, then this library throws its own error which masks the underlying error thrown by the subgraph. Making it impossible to test the errors thrown by a subgraph.
I'm happy to submit a PR if you would consider it?
I'm trying to understand if it is possible to use this library to assert on error responses from a resolver. My use case is:
The problem I have at the moment is that this library throws it's own error because the response is not in a shape it expects for a successful response, e.g.
The text was updated successfully, but these errors were encountered: