Only aggregate photos/locations/countries that are published

This commit is contained in:
2021-11-11 23:05:04 +01:00
parent 52c1916c27
commit 7daf97ba1c

View File

@@ -96,14 +96,21 @@
}
# Count
countPhotos: photo_aggregated {
countPhotos: photo_aggregated (
filter: { status: { _eq: "published" }},
) {
count { id }
}
countTotalPhotosByLocation: photo_aggregated (groupBy: "location") {
countTotalPhotosByLocation: photo_aggregated (
groupBy: "location",
filter: { status: { _eq: "published" }},
) {
group
count { id }
}
countLocations: location_aggregated {
countLocations: location_aggregated (
filter: { status: { _eq: "published" }},
) {
count { id }
}
countCountries: country_aggregated {