GraphQL is a way of exposing an API
It is not a direct interface to the database backend
DB user roles for access control won't help much if you had the credentials to your db stored in javascript source so that the web front end can query your postrges db directly