Why Astronomer is Betting on GraphQL
astronomer.io
astronomer.io
Understand the pause, and if we were a social networking company I'd be more concerned - but already our decision to use GraphQL/React is paying off, as it differentiates for customers looking to integrate our product into their product due to the richness of the API that we are inherently providing.
At the same time I can see that it works in the other way around; back-end engineers don't have to keep up with changing query requirements from the front-end team.
The same is suggested in the article and confirmed in the response to the only comment:
"The point is that most APIs end up having to support lots of different client requirements all at the same time... and then those requirements change... and then they change again. You don't want to have "fix" your API every time this happens. GraphQL would support a lot of these differing requirements with no changes to the server code at all."
"You don't want to have "fix" your API every time this happens." I don't see why not. Requirements change thus code changes, its not a big deal.
The sacrifice you make with this 'not having to change the server side code' is that you are never able to change the server side code again without risking that you take away functionality that is somehow used by some client somewhere. I say 'somehow' because with REST there is usually an endpoint that is either used or not, but with GraphQL there are relations that get used through each other which is less straightforward to determine when pruning or updating your API.
It all depends who you are though. For Github it is probably a good idea to provide a GraphQL API as this freedom in the front-end will make adoption of their API and thus their service more likely. If you are a normal company and you are the only consumer of your API I highly question the added benefit.
I might be wrong though, so if anyone could point me at some high quality resources on the benefit of GraphQL I am very interested. This article wasn't really that.
That can be easier since you can add metrics to each individual field rather than url, allowing you to deprecate rarely used fields knowing what you'll break and alert only those who are using it of the change
Add a new GraphQL version endpoint?
As I said, it could work this way for Github, but not your relatively small SaaS. My point was that investing in these kinds of things might not be for everyone.
On what planet is this "the JS style of development"? SPAs don't want to force the user to refresh the page for no good reason for the exact same reason that you don't want the user to close your app because their token has expired. The idea really isn't significantly different.
Of course the libraries are important too, but even if Facebook specifically strangled GraphQL to death, the idea of simple declarative HTTP API is too valuable to let it die on the vine.
In parallel, even if Facebook decided to strangle their React user base with patent trolling, and everyone decided to ditch React, the idea of a declarative DOM library or unidirectional flow is too good to let it die with React. And so we see it in Vue, Angular, and Preact or Inferno.
Hype may be related to many factors, one of which is mere library or ecosystem polish, often propelled by a big company with labor to spare, but I think the benefits behind a declarative HTTP API are real.
There are articles from GitHub, Shopify, Artsy, Walmart, Coursera, New York Times, and more! And these are just companies that have bothered to write an entire article about their experience.
Seriously, we have DB user roles for access control, and most database traffic from web or app dashboard clients is read based anyway.
It is not a direct interface to the database backend
DB user roles for access control won't help much if you had the credentials to your db stored in javascript source so that the web front end can query your postrges db directly
Of course, you do need to ask yourself these legal questions if you use Relay.
Apart from that GraphQL is the only one library with a known patent by Facebook, so you would actually want to get the patent grant there.
[0]: https://github.com/apollographql/react-apollo/blob/master/pa...
[1]: https://github.com/apollographql/apollo-server/blob/master/p...
[2]: https://github.com/apollographql/apollo-client/blob/master/p...
You should blog in a year about: why we migrated from GraphQL to Postgress ( if it's that immature as i see in the comments)
If all you want is a way to submit SQL queries from a front end to a SQL database, you could just have the front end talk directly to the database. There's no need for a back end app in that case. But APIs are for talking to applications.