adding errors to GraphQLErrors array
RyanLinXiang opened this issue ยท 3 comments
Hi there,
I am new to GraphQL and graphql-shield. Maybe I got something totally wrong - but when I throw an error inside a resolver, it should be added to the errors
array returned by Apollo client (either useQuery
or client.mutate
, I am using the second). But instead I always arrive in the catch block:
try {
const {data, errors } = const apolloClient.mutate(...);
// I want to have the errors here
}
catch (e) {
// why am I always arriving here?
}
I tried "allowExternalErrors: true" - but I am still arriving in the catch block.
Any idea?
BR,
Lin.
Hey @RyanLinXiang ๐,
Thank you for opening an issue. We will get back to you as soon as we can. Have you seen our Open Collective page? Please consider contributing financially to our project. This will help us involve more contributors and get to issues like yours faster.
https://opencollective.com/graphql-shield
We offer
priority
support for all financial contributors. Don't forget to addpriority
label once you become one! ๐
Hmm that's an interesting problem, but I don't think it's caused by GraphQL Shield. Maybe if you compose a small reproduction CodeSandbox I can take a look at it. ๐
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.