3 ms·
I don't like that GraphQL is called GraphQL. Its output cannot represent a graph. Its output is finite. Consider an API that queries people. You query a marri
by WirelessGigabit 4y ago
I don't like that GraphQL is called GraphQL.
Its output cannot represent a graph. Its output is finite.
Consider an API that queries people. You query a married person and include their spouse. And then you include the spouse's spouse, and so on.
GraphQL will render as many levels as you request without deduplication.
JSONAPI will do this much better, you'll get 2 entities in 'data', and they'll refer to each other in their relationships block.
Not that I like JSONAPI. Having built larger system with it there is no universal way of supporting pagination in the includes section which makes it a binary proposition about includes. You get ALL the ones you request, or none.
- foota 4y agoIt's a query language for graphs, not a language for transferring graph data.