Open divine-comedian opened 3 months ago
@Meriem-BM pls work on this with guidance from @mohammadranjbarz
We should implement a new endpoint in recurringDonationResolver.ts
with name of getRecurringDonationStats
totalStreamedUsdValue
The query for summing up totalUsdStreamed
is all donations that have been created in the time range.
If the currency was in input params, you should add the quality of currency in the query
activeRecurringDonationsCount Count of recurring donations with status:'active' in time range If the currency was in input params, you should add the quality of currency in the query
PS Please don't forget to write test cases For writing test cases look at https://github.com/Giveth/impact-graph/blob/staging/src/resolvers/donationResolver.test.ts#L105-L146 to know how to pass dates as input
@divine-comedian Please read this spec and correct me if there is something wrong @Meriem-BM Please tell me if something is not clear to you
This looks great Mohammad!
@maryjaf, this issue is ready for test
Please send the api/query or other thing that I can use it for test of this issue @Meriem-BM @mohammadranjbarz
@maryjaf here is the query
query (
$beginDate: String!
$endDate: String!
$currency: String
) {
getRecurringDonationStats(
beginDate: $beginDate
endDate: $endDate
currency: $currency
) {
totalStreamedUsdValue,
activeRecurringDonationsCount,
}
}
with 2 required variables beginDate
& endDate
and other optional currency
.
Date format YYYY-MM-DD
.
I want to check the response of the query from admin bro->recurring donation tab, but I got below error please take a look @Meriem-BM
It seems this field isn't correct in response of query "totalStreamedUsdValue": 2630.3987 on stg , but i need to check from admin bro to be sure
@maryjaf It still under development, right @mohammadranjbarz (Recurring donations tab)?
@Meriem-BM - this shouldn't go to UAT column until it is ready to test or else this creates confusion.. moving this back
Hey @maryjaf can you check this once again
Hey @maryjaf can you check this once again
Is it ready for testing ? it is on code review state @Meriem-BM
Hey @maryjaf can you check this once again
Is it ready for testing ? it is on code review state @Meriem-BM
Yes @maryjaf, forgot to move it
- total USD value of all recurring donations made in a specific token between two dates
- count of active recurring donations made with a speicfic token created between two dates
Thanks @Meriem-BM
query ( $beginDate: String! $endDate: String! $currency: String ) { getRecurringDonationStats( beginDate: $beginDate endDate: $endDate currency: $currency ) { totalStreamedUsdValue, activeRecurringDonationsCount, } }
- total USD value of all recurring donations between two dates
- count of active recurring donations created between two dates
The tests of these 2 items have been passed
@maryjaf you can pass the token to currency field (DAI
, USDT
...)
@Meriem-BM is it possible to merge this feature to production?
@Meriem-BM is it possible to merge this feature to production?
Yes, the important part is on prod, just last PR isn't which fixes problem of recurring donations tab on admin panel not listing data, do you want me to merge it?
We should be able to query and track the following information related to recurring donations feature:
This information should be available through https://stats.giveth.io/