GraphQL Shield Catching Field Errors that have nothing to do with Auth...
j opened this issue · comments
Below is an example of the error I'm getting.
type Customer {
id: String!
email: String
}
Currently Customer
does not have any shield field rules. In my implementation of Customer.email
, email
is a getter (get email(): string { ...error thrown here... }
). If I throw an error within that getter, I get a Not Authorised!
error. I don't want to perform any authentication on any fields that I don't configure. Why is GraphQL shield catching this error?
I see there is fallbackError
. I just want graphql-shield
to do permission stuff on fields I tell it to, and any error that's not an authorization error, to completely ignore shield stuff. My application has error handling and logging built in and it seems that any field level error does hit my logging.
Hey @j 👋,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.
https://opencollective.com/graphql-shield
PS.: We offer
priority
support for all financial contributors. Don't forget to addpriority
label once you start contributing 😄
Hey, I think this is well documented in the docs and also a duplicate. Please check other issues.
Hint: there's an option in shield
that let's you pass all the error through.
@maticzav I understand that... But there is no way to have a field resolver not be wrapped by graphql-shield
? That's the main thing I'm trying to find. I guess since "*" was created, might be hard to do so.