5 ms·
They didn't mention one very important thing - querying only required data and making connections between resources. For example, you need to download some git
by ex3ndr 10y ago
They didn't mention one very important thing - querying only required data and making connections between resources. For example, you need to download some git commits with user profiles. User is a different resource than git repo. How we can request such data in one single request? Then you will need also to load referenced issues (if present) that is implemented as different resource.
GraphQL solve this problems in a very nice and flexible way.
- kevincox 10y agoIf the data is different there is very little need to ask in a single request. Just send two parallel requests. Of course in some cases getting a list of objects is cheaper then multiple requests but that is only if the objects are "related" and stored together. However I do agree that GraphQL is great for a lot of use cases.
- kazagistar 10y agoNeither side supports the case of [promise chaining](https://capnproto.org/rpc.html https://capnproto.org/rpc.html), where one or more resources can be used to look up further resources in a single round trip. Each style has tradeoffs.