Strapi plugin to allow deep population of API responses.
npm install strapi-plugin-deep-populatenpm install strapi-plugin-populate-deep
yarn add strapi-plugin-populate-deep
Populate a request with the default max depth.
/api/articles?populate=deep
Populate a request with the a custom depth
/api/articles?populate=deep,10
Populate a request with the a custom depth
/api/articles/1?populate=deep,10
The default max depth is 5 levels deep.
The populate deep option is available for all collections and single types using the findOne and findMany methods.
The default depth can be customized via the plugin config. To do so create or edit you plugins.js file.
config/plugins.js
````
module.exports = ({ env }) => ({
'strapi-plugin-populate-deep': {
config: {
defaultDepth: 3, // Default is 5
}
},
});