Help with Auth rule for graphql

So I have made the basic starting Schema to get started with development and so far things are going fine when I want to check for roles or user names inside of the JWT.

but I have a question that, if I want to check just that User is Logged in or not (valid JWT passed or not) and doesn’t really matter which role / username they have. Is there an easier way to do this ? OR do I have to add custom claim with a generic ‘USER’ role and check against that ?

I am asking this because I see that adding custom claims is adding a slight delay because I have to wait for my backend to add those custom claims and then refresh the token on client (this is firebase auth btw).

So if it is possible to just Check if a valid JWT was passed in the header or not, I can save one extra BE call and some crucial initial paint seconds.

Hi @sambhav-gore, you can do that with the closedByDefault flag in Dgraph. Authorization parameters. You just need to set it to true and then even for types which don’t have @auth directive require a valid JWT to query or mutate.