import { AuthChecker } from "type-graphql" ; import { Context } from "../modules/context.type" ; import { AuthenticationError } from "apollo-server-express" ; const useAuth = ( { root , args , context , info } , _roles ) => { if ( ! context . getUser ( ) ) { throw new AuthenticationError ( "User not authenticated" ) ; } return true ; } ; export default useAuth ;