3 ms·
Out of curiosity (didn't had the time to get up to date on it yet), how does GraphQL let you describe your returning data better? Is it because it has hierarchi
by marcosdumay 8y ago
Out of curiosity (didn't had the time to get up to date on it yet), how does GraphQL let you describe your returning data better? Is it because it has hierarchical types (types and collections inside types) or it's something else?
- scrollaway 8y agoWith GraphQL, you are creating what is essentially a 1:1 mapping of the structure of the data you want to get back. It's a lot more intuitive than joins and such.
- eksemplar 8y agoA join in GraphQL looks like this: { getOrganisation(args){ name, employees{ Name, Position }} (I added commas to make it easier to read, but they are not supposed to be there) I know SQL, so I don’t think it’s necessarily easier, but what is easier, is non-sql-savvy people making efficient queries because GraphQL does a lot of the heavy lifting for you.