I would like to add something like this to all my queries and mutations
type Query @middleware(checks: ["moduleCheck", "moduleScope"]){
//
}
Is there a way to run middleware globally?
I can add it to the $middleware
variable in Http\Kernal.php
but then my middleware won't respond with the required queries set to null
, which throws a different error.