Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Certainly SQL has broader capability then GraphQL. However, there is something about being able to issue a query that returns nested data (e.g. query for invoices and all their line items) that is really great about GraphQL and you cannot do the same with SQL.

What I really hate about GraphQL is it forces you to define input types separately from return types - that doubles schema sizes.

Well you can - you can write CTEs and then put all line items in a JSON column or something; but still.



> Certainly SQL has broader capability then GraphQL. However, there is something about being able to issue a query that returns nested data (e.g. query for invoices and all their line items) that is really great about GraphQL and you cannot do the same with SQL.

You absolutely can: https://stackoverflow.com/questions/38458318/returning-postg...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: