Skip to content

Commit

Permalink
fix: Update agg sum request (#3367)
Browse files Browse the repository at this point in the history
Rename sum to _sum in gql requests
  • Loading branch information
connoratrug authored Feb 8, 2024
1 parent 0f57ee5 commit de346ec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions apps/nuxt3-ssr/components/landing/Central.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { data, pending, error, refresh } = await useFetch(
}
Cohorts_agg {
count
sum {
_sum {
numberOfParticipants
numberOfParticipantsWithSamples
}
Expand Down Expand Up @@ -149,7 +149,7 @@ function percentageLongitudinal(
<LandingCardSecondary
icon="person"
title="Individuals"
:count="data.data.Cohorts_agg.sum.numberOfParticipants"
:count="data.data.Cohorts_agg._sum.numberOfParticipants"
>
{{
"The cumulative number of participants of all (sub)cohorts combined."
Expand All @@ -158,7 +158,7 @@ function percentageLongitudinal(
<LandingCardSecondary
icon="colorize"
title="Samples"
:count="data.data.Cohorts_agg.sum.numberOfParticipantsWithSamples"
:count="data.data.Cohorts_agg._sum.numberOfParticipantsWithSamples"
>
{{
"The cumulative number of participants with samples collected of all (sub)cohorts combined"
Expand Down
6 changes: 3 additions & 3 deletions apps/nuxt3-ssr/components/landing/CohortsOnly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { data, pending, error, refresh } = await useFetch(
}
Cohorts_agg {
count
sum {
_sum {
numberOfParticipants
numberOfParticipantsWithSamples
}
Expand Down Expand Up @@ -153,7 +153,7 @@ function getSettingValue(settingKey: string, settings: ISetting[]) {
<b>
{{
new Intl.NumberFormat("nl-NL").format(
data.data.Cohorts_agg.sum.numberOfParticipants
data.data.Cohorts_agg._sum.numberOfParticipants
)
}}
{{
Expand All @@ -176,7 +176,7 @@ function getSettingValue(settingKey: string, settings: ISetting[]) {
<b
>{{
new Intl.NumberFormat("nl-NL").format(
data.data.Cohorts_agg.sum.numberOfParticipantsWithSamples
data.data.Cohorts_agg._sum.numberOfParticipantsWithSamples
)
}}
{{
Expand Down
2 changes: 1 addition & 1 deletion apps/nuxt3-ssr/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineNuxtConfig({
siteTitle: "MOLGENIS",
analyticsKey: "",
cohortOnly: false,
apiBase: process.env.NUXT_PUBLIC_API_BASE || "https://data-catalogue.molgeniscloud.org/",
apiBase: process.env.NUXT_PUBLIC_API_BASE || "https://data-catalogue-acc.molgeniscloud.org/",
},
},
imports: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const query = `query CataloguePage($networksFilter:NetworksFilter,$variablesFilt
}
Cohorts_agg(filter:$cohortsFilter) {
count
sum {
_sum {
numberOfParticipants
numberOfParticipantsWithSamples
}
Expand Down Expand Up @@ -303,12 +303,12 @@ const aboutLink = `/${route.params.schema}/ssr-catalogue/${catalogueRouteParam}/
<LandingSecondary>
<LandingCardSecondary
icon="people"
v-if="data.data.Cohorts_agg?.sum?.numberOfParticipants"
v-if="data.data.Cohorts_agg?._sum?.numberOfParticipants"
>
<b>
{{
new Intl.NumberFormat("nl-NL").format(
data.data.Cohorts_agg?.sum?.numberOfParticipants
data.data.Cohorts_agg?._sum?.numberOfParticipants
)
}}
{{
Expand All @@ -329,12 +329,12 @@ const aboutLink = `/${route.params.schema}/ssr-catalogue/${catalogueRouteParam}/

<LandingCardSecondary
icon="colorize"
v-if="data.data.Cohorts_agg?.sum?.numberOfParticipantsWithSamples"
v-if="data.data.Cohorts_agg?._sum?.numberOfParticipantsWithSamples"
>
<b
>{{
new Intl.NumberFormat("nl-NL").format(
data.data.Cohorts_agg?.sum?.numberOfParticipantsWithSamples
data.data.Cohorts_agg?._sum?.numberOfParticipantsWithSamples
)
}}
{{
Expand Down

0 comments on commit de346ec

Please sign in to comment.