diff --git a/src/lib/events.ts b/src/lib/events.ts index dc34d47..8430e70 100644 --- a/src/lib/events.ts +++ b/src/lib/events.ts @@ -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) {