News for hackers. Stuff that matters.
Re:GitHub announcements: Marketplace, Apps and GraphQL API by nailer on Monday May 22, 2017 @07:18AM (#14392572)
The main thing vs REST is that it fixes the 'overlapping data in resources' issue. Want a timeline of tweets? Well you'll also want avatars to display, and you probably don't want that in a separate resource (because of multiple requests), so both /tweets and /users/userid will give you avatar details. It's a bit messy.

In graphQL there's one resource and you query it to tell you what you want.

Re:GitHub announcements: Marketplace, Apps and GraphQL API by philstu on Monday May 22, 2017 @10:34AM (#14393873)
Hey! I cover that a bit ni a followup blog post :)

https://blog.runscope.com/posts/you-might-not-need-graphql

tl;dr: maybe you want OData, JSON-API, or one of the many other standards or practices that solve this simple problem as their super-set of functionality on top of the networking principles of REST.

Using GraphQL for this alone is rather nuclear, as you gain a lot with GraphQL but lose other stuff.

Re:GitHub announcements: Marketplace, Apps and GraphQL API by nailer on Tuesday May 23, 2017 @07:18AM (#14400320)
What do you lose? I actually use REST ATM but interested in GraphQL for my next project.