fetch and filter on event categories

This commit is contained in:
2024-05-13 03:50:48 +02:00
parent 79c7b8ba43
commit 26df80b65e
8 changed files with 118 additions and 24 deletions

View File

@ -10,9 +10,17 @@ import {
} from "date-fns";
import { toLocalTime, formatDate } from "./date";
import { graphql } from "@/gql";
import { EventFragment, EventOccurrence } from "@/gql/graphql";
import {
EventFragment,
EventCategoryFragment,
EventOccurrence,
} from "@/gql/graphql";
export type { EventFragment } from "@/gql/graphql";
export type {
EventFragment,
EventCategoryFragment,
EventOccurrence,
} from "@/gql/graphql";
export type SingularEvent = EventFragment & {
occurrence: EventOccurrence;
@ -73,6 +81,13 @@ export const allEventsQuery = graphql(`
...Event
}
}
eventCategories: eventCategories {
... on EventCategory {
name
slug
showInFilters
}
}
}
`);