3 ms·
Client-side shaping of queried data without directly writing SQL against a back-end database, and without having to pre-arrange queried data structure with the
by Fellshard 7y ago
Client-side shaping of queried data without directly writing SQL against a back-end database, and without having to pre-arrange queried data structure with the back-end.
- zozbot234 7y agoWouldn't SPARQL be a better choice for this? It's an actual Web standard, unlike GraphQL so a better fit to general-purpose clients with no "pre-arranged queried structure".
- miles-po 7y agoSPARQL is a flat result set, just like SQL. Also so much like SQL, it's not actually an advantage over SQL, just removed from a relational database. GraphQL is hierarchical. The queries look substantially like the output JSON. SPARQL (and SQL) require training. With a common tool like GraphiQL or Playground, queries are simple enough and abstracted enough (am I querying Redis, PostgreSQL, S3, or some combination?) that clients don't have to know much of anything except what data they want. That's huge. It puts the onus on server developers to audit their data and security models, but they should be doing that anyway no matter what the stack looks like.