diff --git a/src/components/MyKiva/MyKivaStats.vue b/src/components/MyKiva/MyKivaStats.vue index 9545d5b3c4..128686ffc3 100644 --- a/src/components/MyKiva/MyKivaStats.vue +++ b/src/components/MyKiva/MyKivaStats.vue @@ -107,7 +107,7 @@ onMounted(() => { totalAmountLent.value = result.data?.my?.userStats?.amount_of_loans ?? 0; // Handle new user use-case totalAmountLent.value = totalAmountLent.value === '0.00' ? 0 : totalAmountLent.value; - totalCountriesLentTo.value = result.data?.my?.statsPerCountry?.totalCount ?? 0; + totalCountriesLentTo.value = result.data?.my?.lendingStats?.lentTo?.countries?.totalCount ?? 0; isLoaded.value = true; }).catch(e => { logReadQueryError(e, 'MyKivaPage myKivaQuery'); diff --git a/src/graphql/query/myLendingStats.graphql b/src/graphql/query/myLendingStats.graphql index 19fb434720..a028fae3de 100644 --- a/src/graphql/query/myLendingStats.graphql +++ b/src/graphql/query/myLendingStats.graphql @@ -24,17 +24,20 @@ query myLendingStats { name } lentTo { - borrowers { - totalCount - } - } + borrowers { + totalCount + } + countries { + totalCount + } + } } userStats { - amount_of_loans - } + amount_of_loans + } statsPerCountry { - totalCount - } + totalCount + } } lend { countryFacets {