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
@dai4 thank you for opening the issue. Currently, I hold a strong opinion of the effects in graphql-shield. One of the primary concerns while building it was making sure no data would lack due to mistakes to secure smooth sailing while developing the permission layer. Because of that, you cannot alter the return value of the business logic functions (i.e. the underlying function) using rules.
Despite my opinion, I see a growing number of requests for such functionality. I believe I'll introduce it with a rule named effect in the upcoming version of graphql-shield as it requires a complete rewrite of the core.
Question about GraphQL Shield
Is it possible to return a custom value when a rule fails? For example, I have:
I would like the images to return
[]
rather thannull
.The text was updated successfully, but these errors were encountered: