Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions content/_partials/extension-hook-exceptions.md

This file was deleted.

10 changes: 10 additions & 0 deletions content/_partials/extension-hook-system-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
::callout{icon="material-symbols:info-outline"}
**System Collections**

- `<system-collection>` should be replaced with the system collection name without the `directus_` prefix. For example, listening for new records in the `directus_users` collection becomes `users.create`.

**Exceptions**

- The `collections` and `fields` system collections do not emit a `read` event. The `files` collection does not emit a `create` or `update` event on file upload. The `relations` collection does not emit a `delete` event.

::
8 changes: 4 additions & 4 deletions content/guides/09.extensions/2.api-extensions/1.hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ The context object has the following properties:

<sup>[3]</sup> Available for the `oauth2`, and `openid` driver if set by provider.

:partial{content="extension-hook-exceptions"}

:partial{content="extension-hook-footguns"}

::callout{icon="material-symbols:warning-rounded" color="warning"}
**Filters are Blocking**
Filters can impact performance if not implemented carefully, especially on `read` events, which can lead to many database reads.
::

:partial{content="extension-hook-system-collections"}

## Action

Action events are called after an event is emitted.
Expand Down Expand Up @@ -183,10 +183,10 @@ The context object has the following properties:
| `<system-collection>.update` | `payload`, `keys`, `collection` |
| `<system-collection>.delete` | `keys`, `collection` |

:partial{content="extension-hook-exceptions"}

:partial{content="extension-hook-footguns"}

:partial{content="extension-hook-system-collections"}

## Init

Init events are called during the Directus application lifecycle.
Expand Down