There were times when it was popular to generate a GraphQL API from your database but that's not how the query language is used today.
GraphQL is a query language to implement query style APIs. These days, it's most widely used as a "Federation" layer to expose a single query-able graph on top of a (micro-) service architecture.