The tutorial had the following at // pages/events/[slug].tsx
. I assume this is the part to be modifying for my Plasmic [[...catchall]].tsx
?
const client = new GraphQLClient(process.env.NEXT_PUBLIC_HYGRAPH_URL);
export const getStaticPaths: GetStaticPaths = async () => {
const query = gql`
query Events {
events {
slug
}
}
`;
const data = await client.request(query);
return {
paths: data.events.map((event) => ({ params: { slug: event.slug } })),
fallback: "blocking",
};
};