cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

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?

0 REPLIES 0