Creates function that accepts Role and returns middleware function for resolvers
Checks whether user is logged and have atleast required role. In case of error throws exception.
Parameters
authException: any
Object to be thrown in case of unsuccesfull authentication
Creates function that accepts Role and returns middleware function for resolvers Checks whether user is logged and have atleast required role. In case of error throws exception.