-
-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContributionFlow: Information requirement resolvers #10661
Conversation
totalContributedToHost: { | ||
buildLoader: ({ | ||
since, | ||
hostId, | ||
}: { | ||
hostId: number; | ||
since: Date | string; | ||
}): DataLoader< | ||
number, | ||
{ CollectiveId: number; amount: number; currency: SupportedCurrency; HostCollectiveId: number } | ||
> => { | ||
const key = compact([hostId, since]).join('-'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the benefit of using buildLoader
rather than just a regular loader here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I'm tripping, but isn't this required for sharing the since
and hostId
parameters across multiple DataLoader calls.
a8c7992
to
6648f5c
Compare
Adds CONTRIBUTOR_INFO_THRESHOLDS policy and ContributorProfile.totalContributedToHost resolver.