Earlier quoted context omitted.
OK to give you a clear example. Say you have a REST interface for Student and Class. What do you do in rest if you want to get just a class? What do you do if you want to get a class and its students? What do you do if you want to get a Student and also its class? For every iteration of the way you need to access the data you have to modify and extend your REST endpoint or do separate queries. Every time the frontend…
Isn't this exactly what SQL is supposed to be for? Why not just submit SQL queries and get the response directly from the DB? That is to say, what differentiates GraphQL from SQL?
I can write a Graphql endpoint in python (Using Django-Graphene). I can write python functions that return data to the graphql. I can write ORM queries that write data to grapqhl. I can specify access, permissions and certain queries based on the user.
Graphql is more of a relational FFI than a SQL replacement.
Also the frontend never sends SQL to get data because it is unsafe. This is what a GraphQL framework allows you to do, clean up and filter queries so they are safe and then translate them into efficient lookups in a RDBMS.