Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Schema-wide @auth(rules: [{isAuthenticated: true}]) directive for all the types in the Schema

I'm using jwt {secret: KEY} way of handling the authorization and it works well, but I have to inject all the Type defenitions with @auth directive or extend the Types like
extend type Person @auth(rules: [{isAuthenticated: true}]) and it works fine on a per-type basis

My question: is there a way to set @auth directive to check if the user is a valid token for all the Types in the schema at once?
Something like "extend type Query @auth(rules: [{isAuthenticated: true}])" - which throws an error?