Strapi v5: Dynamic Zone populate Results in 500 Error When Specifying Individual Components

Description: I’m working with Strapi v5 and trying to query a Dynamic Zone (body) that includes multiple components, each with nested fields. My goal is to avoid using populate: “*” to prevent fetching unnecessary data, so I’m attempting to populate only specific fields within each component. However, specifying individual components in the populate query consistently results in a 500 Internal Server Error.

Here’s the structure of the body Dynamic Zone:

body-text: Includes nested text fields.
youtube-link: Contains a youtubeLink field.
copyright-image: Includes fields for Author, copyright, and nested image data.
carrousel-image: Contains an array of image metadata.
When I use populate: “*” on body, the query works, but it returns excess data. However, when trying to specify each component separately within the populate object, like this:

populate: {
body: {
populate: {
‘body-text’: { fields: [‘text’] },
‘youtube-link’: { fields: [‘youtubeLink’] },
‘copyright-image’: { fields: [‘Author’, ‘copyright’] },
‘carrousel-image’: { fields: [‘carrousel’] }
}
}
}

… the query fails with a 500 error.

This topic has been created from a Discord post (1300851904666009710) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

you should get more info on the terminal with your error…

try removing line by line in your populate and see which one is making the error