News for hackers. Stuff that matters.
Re:Thinking in GraphQL by pramodliv1 on Thursday October 08, 2015 @09:41AM (#10352664)
We're building a single page app with all the rendering done on the client(clichéd, yeah) and a RESTish Dropwizard API server

We have a page which requires integrating data from 12 different REST APIs. Making 12 HTTP requests takes a lot of time. So the obvious solution is to merge the APIs on the server and make a 'business' API specific to that page.

But we did not want to repeat all the merging logic on the server during launch.

To alleviate the problem, I created a dependency graph/DAG for all the 12 APIs and fired HTTP requests concurrently at each level instead of using 12 promises which increased performance significantly.

Does GraphQL support such use-cases?

Re:Thinking in GraphQL by leebyron on Thursday October 08, 2015 @01:36PM (#10354387)
GraphQL is designed for exactly this use case