Revalidating a SSG path in a tRPC procedure

Hello guys, how could I revalidate a path in a tRPC procedure? I have a NextJS pages site that is mainly SSG with an admin panel. When a user creates a new blogpost for.example I want to revalidate that path (ISR) (https://nextjs.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration#using-on-demand-revalidation).

How could I do that? I probably need the Response object from NextJS

This is my procedure:
createBlogPost: protectedProcedure
  .input(blogPostSchema)
  .mutation(async ({ input }) => {
    const blogpost = await db.blogPost.create({
      data: {
        title: input.title,
        body: input.body,
        post_date: input.post_date,
        image_url: input.image_url,
      },
    });
    return blogpost;
  }),
}),
Was this page helpful?