Thank you, that's actually an idea I considered a while ago - embed some wasm in a GET request (which retrieves complete contract state from the network) that could pre-process the state before returning it to the requestor.
The issue was that Freenet requires that intermediate peers can cache the contract state as they're passing it back to the requestor so in the end I decided against it, but might revisit in the future.
yea, there's a lot of scenarios it doesn't make sense in imo. and even with processing-gas-limits it's still kinda weird and harder to prevent abuse on (e.g. you can't predict costs because you don't know what requests it might send next - graphql's declarative approach helps it here).
but for e.g. mobile apps with a trusted backend? probably great. you could even just send hashes of the WASM blobs because they will often be identical (and the full blob if that fails), and some serialized data to serve as args that vary (e.g. page-size limit of the third internal request), and you'd have an absurdly flexible system with fairly small requests. I'm just not sure how small, or if it'd end up computationally worth it compared to graphql / sparql / etc.