GraphQL makes sense for Github because they have a public API with user demand for data-structures in great variation in returned data.
If you're small or medium you are much better off not dealing with GraphQL at all because it's much easier to work and maintain queries than it is dealing with GraphQL.
If you're using something such as postgres they have amazing JSON functions so you directly return JSON straight from the database.
Adjustability. If you have a very rich data model, for example, if one order of your e-shop must return the full thing when you need it and just order id and order date for the orders list.
Multiple sources. For example, you may want to have Cassandra DB for analytics (cheap writes, expensive reads) and some SQL DB for everything else (cheap reads, expensive writes) and want to assemble this all to provide some unified API
Aside from that, GraphQL just reduces the amount of code you have to write, and less code means less bugs :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Explain to me like I'm a total newbie (almost true).
Why is graphql a better option, for a small/medium sized application, than simply sending the result of a SQL statement as json?
GraphQL makes sense for Github because they have a public API with user demand for data-structures in great variation in returned data.
If you're small or medium you are much better off not dealing with GraphQL at all because it's much easier to work and maintain queries than it is dealing with GraphQL.
If you're using something such as postgres they have amazing JSON functions so you directly return JSON straight from the database.
Aside from that, GraphQL just reduces the amount of code you have to write, and less code means less bugs :)