Open patrick91 opened 3 years ago
dictionaries help avoiding duplicates, so this might be worth investigating?
From discord:
@AndrewIngram: The load key isn’t always a simple scalar (it could be all the resolver args, more common when batching connections and similar), so wouldn’t necessarily work as a dict key. So returning an array of the same length as the key array is safer. But I don’t see a reason not to optionally allow returning a dict.
https://discord.com/channels/689806334337482765/750088532479180840/893486642499846224
Currently we allow to return list in load functions for dataloaders, as shown in our example:
we could allow returning dictionaries too:
Upvote & Fund