跳到主要内容

The webhooks.populateRelations server configuration is removed

In Strapi 5, webhooks have been refactored and the webhook.populateRelations option will become redundant. This might affect lifecycles expecting the returned relations of create, update and delete to be populated.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?No

Breaking change description

In Strapi v4

When an entry is created, updated, or modified in any way, the response payload of the Content Manager backend returns the total count of relations for every relational field.

You can see the count being used at the top of the relation in the Content Manager Edit view:

Content-Manager screenshot that shows populated relations count

The actual relational values are fetched using another endpoint. This was made to enhance the performance of the Content Manager requests.

To simplify webhook consumption, you can enable the (see server configuration). When enabled, all relations values are populated and sent to the webhook consumers, resulting in performance decrease.

In Strapi 5

Webhooks will be refactored, so the webhooks.populateRelations configuration is not necessary, but changing how things are populated might impact other things like database lifecycles expecting the returned relations of create, update and delete to be populated.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

Additional information will be given once the webhooks are refactored.

Manual procedure

Relying on any input populate values on database layer is not reliable, so if necessary in your custom code base, the lifecycle should always fetch the necessary data.