Re:Where in the HypeCycle is GraphQL?
by ako on Tuesday July 13, 2021 @11:00AM
(#27821824)
Fair point: GraphQL is mostly a data retrieval protocol that helps you retrieve specific data as stored by the app. SQL also provides data transformation with grouping, aggregations, functions, where clauses, views, subqueries, etc. You could implement that in the resolver, but then you're at the mercy of the api implementer.
[ Parent
| on HN ]
Re:Where in the HypeCycle is GraphQL?
by joshribakoff on Tuesday July 13, 2021 @11:17AM
(#27822022)
You can use SQL in your resolver, like you mention. Note you’re also at the mercy of the API implementor if they use SQL in a REST endpoint.
GQL also has some affordance for renaming fields (although admittedly nothing like SQL for the client, if you did allow running sql via the client it would be harder to sanitize, so this is a “feature” not a “bug”)