Webonyx GraphQL and Permissions

Can you suggest a good way to handle permissions. Like after custom logic the query returns “permission deny” error, same as 403 error.
Can’t find any good idea. Currently the check was done in resolver. But bad thing is that each resolver has to call same function for permission check and return mixed Type. I am looking for idea of middleware, like authantication.

Your question assumes everybody understands what you are writing, which might not be the case. Please write question that attracts help.

Thank you for replying. I need an advice, I roadmap or best practice/example to handle permissions in area of Yii2/GraphQL.
May be someone with experience of using Webonyx/GraphQL faced with permission handling problem and may give me an good advice :slight_smile: