|
|
|
|
|
by ruslan_talpa
3433 days ago
|
|
While I also have a vested interest in GraphQL (competing in the same space as Scaphold) I agree partially with what you stated above but it's not all that bad as you seem to imply. Yes, FB does have the power (now) to change the spec over night but so far it was mostly stable and whatever changes were added were only for the better. No new technology comes to life as a standard, it needs someone inventing it, maintaining it, promoting it up to the point where people can get behind it and form a group and make it a standard. Let's give FB a chance, so far it has done an excellent job with the GraphQL standard.
On the other hand, graphql-js and Relay are not that stable yet and their interfaces are changing very fast and probably for people that use them it's a bit frustrating but it's only been a year and i bet they will get to a stable interface in 2017 enough for people to be able to really depend on them. >There was no reason to ignore what already exists and works for the web at large. GraphQL came to life (and a lot of people adopted it practically over night) precisely because the things that "already existed" did not work really well (REST for SPA/Mobile).
When a lot of your business logic (whatever that means :)) moves to the frontend (browser/mobile), the backend API tend to become very complex in order to support the frontend and REST can not express very well that complexity.
Whenever people "sell/promote" GraphQL, they bring up 2 main benefits, fetching the data you need in a single request and integrating multiple backends/microservices.
If you look at GraphQL only form this perspective i would agree with you that it brings nothing radically new to the table.
You can have a REST api flexible enough to be able to get only the data you need in one request (see http://postgrest.com) and you can integrate multiple microservices behind it, we've also seen in the past "typed" schemas (WSDL and things like that). Imo what makes GraphQL so nice is the the simplicity (Rich Hickey's definition), how you immediately get what a query does, how it relates to JSON and the shape of the response you get back. Making something "simple" is very hard work and i think FB nailed it. |
|