4 ms·
GraphQL seems like a nice idea. Are there any negatives that might not be obvious from just reading the docs?
by WhitneyLand 10y ago
GraphQL seems like a nice idea.
Are there any negatives that might not be obvious from just reading the docs?
- chair-law 10y agoAlso- is graphQL useful for non-social products?
- borplk 10y agoSure 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.
- tomdale 10y agoI tweetstormed about this once. https://mobile.twitter.com/tomdale/status/786950181522636801 https://mobile.twitter.com/tomdale/status/786950181522636801
- ec109685 10y agoWhat does something like this mean: "GraphQL will replace REST in the same way MongoDB replaced PostgreSQL"
- boubiyeah 10y agoInitially, 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.
- sorenbs 10y agoGraphQL 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.
- ruslan_talpa 10y agoYou/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"?