So, in principle I like everything with David's new approach... the main question I have is "How well do 'recursive queries' work when the data relationships between my components is really complex?" I think I will only be able to answer that question by trying this approach myself and seeing how it performs for my needs.
(Another question is: "How am I going to use this when my server's database is a blockchain and not a conventional database [1] like datomic?" but I know that's a niche question I'll have to figure out for myself.)
Thats indeed something that doesn't seem to be discussed much, even if you look at graphql's presentation - https://www.youtube.com/watch?v=WQLzZf34FJ8 there seems to be a lot of redundancy when "my friends including their events" is fetched.
I imagine that a scheme based on an UUID and deduplication would work - when constructing the response an object repository is kept and if an object with the same uuid appears twice its replaced with a reference to them.
Going against the "don't extend JSON" best practice, that would be:
(Another question is: "How am I going to use this when my server's database is a blockchain and not a conventional database [1] like datomic?" but I know that's a niche question I'll have to figure out for myself.)
[1] Just kidding (mostly)