Join Data from PostgreSQL Declaratively in GraphQL Without Writing SQL
stepzen.com
stepzen.com
Or, more innocently, you can write some hilariously wasteful queries in SQL (join on string replacements? create absurdly unnecessary temp tables? seen both). GraphQL queries have a much more limited ability to fuck up the server.
That said, you don't have to choose only one of the two. At my company we use a GraphQL backend for simple SELECTs which are the vast majority of front-end queries - no reason to involve a backend engineer for them. However, traditional backend calls are used for data modification commands (to enforce business rules server-side) and for performance-critical queries (to tune the raw SQL query/ies as necessary).
Uh, what?
SQL allows you to do many things more effectively and faster than in-code. It's more than just a persistent store; it uses the power of math to do things faster. As an example, aggregation can be faster in the DB if your data is the correct shape (via group by).
The examples use Int! for params, so it's unclear how the framework/product deals with interpolation. While looking up the docs <https://stepzen.com/docs/custom-graphql-directives/directive...> I noticed that your blog uses "$1" and the docs uses ordered "?"
Then, I saw this one <https://stepzen.com/docs/custom-graphql-directives/directive...> and wondered what happens if I send `@rest(endpoint="http://169.254.169.254")`
What about N-N relations? How hard has doing LEFT / INNER / OUTTER JOIN become - is learning SQL really to much for the modern dev (Somewhat sincerely asking)?