#graphql on the mind
I don’t think “avoiding” is the right word here — I mean, for individual resolvers for uninformed non-array fields, yes. But the whole reason DataLoader was created was to solve this problem. If you have an API that supports bulk fetching, you should probably be using it.
-
-
I swear the docs specifically callout that they recommend individual lookups vs batch fetch, as the individual looks have a better caching profile. I'll have to find the reference in the docs.
-
Of course. We specifically focus on that in our GQL app (but we also aren’t interfacing with any APIs that support batch, while we have many situations where we‘d use it). It comes down to your use case and the cacheability of your data, as DataLoader wouldn’t exist otherwise.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.