Home / Function/ revalidateDelete() — supabase Function Reference

revalidateDelete() — supabase Function Reference

Architecture documentation for the revalidateDelete() function in revalidatePost.ts from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/cms/src/collections/Posts/hooks/revalidatePost.ts lines 40–54

export const revalidateDelete: CollectionAfterDeleteHook<Post> = async ({
  doc,
  req: { context },
}) => {
  if (!context.disableRevalidate) {
    const path = `/posts/${doc?.slug}`
    try {
      const { revalidatePath, revalidateTag } = await import('next/cache')
      revalidatePath(path)
      revalidateTag('posts-sitemap')
    } catch {}
  }

  return doc
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free