import { AuthChecker } from 'type-graphql' export const authCheckerAdmin: AuthChecker = ( { root, args, context, info }, roles ) => { if (!roles.includes('admin')) return false if (context.administrator) return true return false }