Should I use dataloaders in relay.Node.resolve_nodes?
I've got a node type like this:
Should I be using dataloaders to resolve my nodes here?
If so, should I use a separate dataloader when required=False
and a separate dataloader when required=True?
Or am I completely wrong and should I just use my repository layer directly here?
6 Replies
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Oh, right! Thank you! So my doubt is.. is it a common pattern to implement two separate dataloaders: one which raises an error and another one which does not?
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
off the top of my head, I think it would be nice if we could somehow pass the required argument to the dataloader, something like:
so that the dataloader fetch function can handle this logic..
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Oh that's actually a brilliant idea!