class GraphQL::UnauthorizedError

When an authorized? hook returns false, this error is used to communicate the failure. It’s passed to Schema.unauthorized_object.

Alternatively, custom code in authorized? may raise this error. It will be routed the same way.