Only count published photos on Grid count

This commit is contained in:
2022-09-19 14:55:10 +02:00
parent b1448f9db3
commit f37a84d4f3

View File

@@ -52,7 +52,16 @@ export const load: PageServerLoad = async ({ url }) => {
}
# Total
total_published: photo_aggregated ${queryCountry !== 'all' ? `(filter: { location: { country: { slug: { _eq: "${queryCountry}" }}}})` : ''} {
total_published: photo_aggregated ${queryCountry !== 'all' ? `(
filter: {
location: { country: { slug: { _eq: "${queryCountry}" }}},
status: { _eq: "published" },
}
)` : `(
filter: {
status: { _eq: "published" },
}
)`} {
count { id }
}
}`)