Update src/lib/events.ts

This commit is contained in:
Kevin Kandlbinder 2025-03-12 23:24:21 +01:00
parent 6624e52709
commit cf3c1f99a8

View file

@ -32,12 +32,24 @@ export const fetchNextUpcoming = async () => {
}>(`
query {
event_attendances(filter: {
start_date: {
_between: [
"${now.toISODate()}",
"${now.plus({ days: 120 }).toISODate()}"
]
}
_or: [
{
start_date: {
_between: [
"${now.toISODate()}",
"${now.plus({ days: 120 }).toISODate()}"
]
}
},
{
end_date: {
_between: [
"${now.minus({ days: 2 }).toISODate()}",
"${now.plus({ days: 120 }).toISODate()}"
]
}
}
]
}, sort: [
"start_date"
], limit: 3) {