Custom map keys in GraphQL response
问题 I've been looking into GraphQL as a replacement for some REST APIs of mine, and while I think I've wrapped my head around the basics and like most of what I see so far, there's one important feature that seems to be missing. Let's say I've got a collection of items like this: { "id": "aaa", "name": "Item 1", ... } An application needs a map of all those objects, indexed by ID as such: { "allItems": { "aaa": { "name": "Item 1", ... }, "aab": { "name": "Item 2", ... } } } Every API I've ever