at this point in this video where Robert Zhu - worked in the team of GraphQL - explained how certain requirements in REST would have to make 5-7 REST calls to get the data.

I was just about to say, well, instead of calling 7 REST calls by snaking your way through the hypermedia-REST compliance API, why not create a custom API that returns all the characters in all films for the input character provided in the path variable? After all, his motive is that 7 REST calls take 3 seconds hitting so many endpoints.

Custom API that would take less than 300 msec.

api/relatedcharacters/1 (1 is the characterid of luke skywalker)

I then realized the power of GraphQL: It universalizes the above custom API like an engine, without having to write custom APIs for custom requirements. Watch the first 8 minutes.


This free site is ad-supported. Learn more