diff --git a/src/graphql/context/features/guard.ts b/src/graphql/context/features/guard.ts index 82b5876..0a968b0 100644 --- a/src/graphql/context/features/guard.ts +++ b/src/graphql/context/features/guard.ts @@ -2,7 +2,7 @@ import { GuardFunction } from "@/graphql/context/types"; const initGuard: GuardFunction = auth => { return { - isAuthenticated: !!auth?.accessToken, + isAuthenticated: Boolean(auth?.accessToken), hasRole: (roleName: string) => { return Array.isArray(auth?.roles) && auth.roles.some(r => r.name === roleName); },