While GraphQL has it uses, i can't seem to see how putting the query logic in your frontend is a good thing:
How do you control scaling, and writing performant queries?
When you make an API endpoint you have control over the queries you make and how you make them.
With GraphQL you lose that control right?
Maybe its good for internal projects, where you own the client and server. But often just exposing the internal DB directly to GraphQL is probably not a good idea. Maybe writing the DataLoaders yourself is better. But then you are already close to the effort of writing a simple endpoint.
With GraphQL you have the flexibility to utilize both REST and RPC patterns, with the added benefit of a type system and ability to choose the fields returned on the client. You can write common CRUD queries/mutations similar to how you would with REST (allUsers/allProjects. If you have a query that you know ahead of time will be inefficient, you can add in a more RPC or dedicated endpoint style query that you can optimize how you see fit on backend (getAllCrazyThings(filters) etc).
For the performance aspect, check out Apollo Engine, which allows you to track the latency and implications of using different fields within your queries and mutations over time:
GraphQL endpoints are API endpoints. You have to write the resolver yourself, which will do things like query the DB.
GraphQL is just a schema specification like Swagger. It doesn't come with a server or a client. Those are implementation details left up to you, just like in REST.
How do you control scaling, and writing performant queries? When you make an API endpoint you have control over the queries you make and how you make them.
With GraphQL you lose that control right? Maybe its good for internal projects, where you own the client and server. But often just exposing the internal DB directly to GraphQL is probably not a good idea. Maybe writing the DataLoaders yourself is better. But then you are already close to the effort of writing a simple endpoint.
For simple API's graphql seems like overkill.