News for hackers. Stuff that matters.
Re:PostGraphQL: PostgreSQL meets GraphQL by WhitneyLand on Monday December 12, 2016 @10:49PM (#13164276)
GraphQL seems like a nice idea.

Are there any negatives that might not be obvious from just reading the docs?

Re:PostGraphQL: PostgreSQL meets GraphQL by tomdale on Monday December 12, 2016 @11:23PM (#13164418)
Re:PostGraphQL: PostgreSQL meets GraphQL by ec109685 on Tuesday December 13, 2016 @01:31AM (#13164978)
What does something like this mean: "GraphQL will replace REST in the same way MongoDB replaced PostgreSQL"
Re:PostGraphQL: PostgreSQL meets GraphQL by boubiyeah on Tuesday December 13, 2016 @02:43AM (#13165229)
Initially, MongoDB was marketed as a simpler, better, drop-in replacement for SQL databases (PostgreSQL didn't support schema-less JSON at the time) It was just crappy, dishonest marketting like the mongoDB team often produce.

GraphQL does the same when it compares itself to REST. It has problems of its own and it's a false dichotomy. It's just marketting.

Re:PostGraphQL: PostgreSQL meets GraphQL by sorenbs on Tuesday December 13, 2016 @09:10AM (#13166835)
GraphQL was designed to solve facebooks issue - efficiently fetch data for an entire view. In addition to this it provides structure that makes it easier for large dev teams to collaborate. If your app is similar to facebook from a technical perspective just jump right in. If you are very different, definitely do some more exploration first. For example I spoke to a dev on the facebook ad analytics team and he complained that he couldn't find a good way to fit their queries into the GraphQL paradigm. Their queries are much more dynamic than most consumer/business apps and includes advanced aggregations etc.
Re:PostGraphQL: PostgreSQL meets GraphQL by ruslan_talpa on Sunday December 18, 2016 @05:42AM (#13205263)
You/he seem to to say "GraphQL is not as flexible as SQL", and that is true but it's not in competition with SQL (but REST). Answering with a question, can that facebook dev fit the same query in rest somehow better then in GraphQL. Any any other way besides "i'll build this new endpoint for this new query"?
Re:PostGraphQL: PostgreSQL meets GraphQL by chair-law on Monday December 12, 2016 @11:02PM (#13164331)
Also- is graphQL useful for non-social products?
Re:PostGraphQL: PostgreSQL meets GraphQL by borplk on Monday December 12, 2016 @11:40PM (#13164481)
Sure why not? GraphQL is not specific to social products.

Any application where a user might want/need bits and pieces of various objects pieced together would be appropriate and that's a lot of applications.

For example if you are loading a user's dashboard view you may need basic user info, their unread messages, the list of objects they are looking at (e.g. list of invoices) and things like that.

Without GraphQL you'd be making separate requests to pull all of that together, with GraphQL it can happen in one round-trip.