Skip to content

docs: explain collection hook lifecycle order#15912

Open
atimmer wants to merge 1 commit intopayloadcms:mainfrom
atimmer:docs/collection-hooks-lifecycle
Open

docs: explain collection hook lifecycle order#15912
atimmer wants to merge 1 commit intopayloadcms:mainfrom
atimmer:docs/collection-hooks-lifecycle

Conversation

@atimmer
Copy link
Contributor

@atimmer atimmer commented Mar 11, 2026

What?

A page listing the order in which operations run.

Why?

I was trying to answer the question: Which hook should I use for this use-case I have?

While I still worked in WordPress, there was this page that contained all the hooks for the complete request lifecycle. I felt that would also be a useful docs page to have for Payload.

How?

I let Codex CLI trace the current implementation and determine the correct order and generate the doc. The LLM used these files:

  • packages/payload/src/collections/operations/*
  • packages/payload/src/collections/operations/utilities/update.ts
  • packages/payload/src/fields/hooks/beforeChange/*
  • packages/plugin-import-export/src/import/*

@atimmer atimmer force-pushed the docs/collection-hooks-lifecycle branch from ba31632 to 47e93a8 Compare March 11, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant