1.0.2 • Published 9 months ago

strapi-plugin-ejoy-populate v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Strapi plugin populate-deep

This plugin allows for easier population of deep content structures using the rest API.

Installation

npm install strapi-plugin-ejoy-populate

yarn add strapi-plugin-ejoy-populate

Usages

Examples

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

Good to know

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.

Configuration

The default depth can be customized via the plugin config. To do so create or edit you plugins.js file.

Example configuration

config/plugins.js

module.exports = ({ env }) => ({
  'strapi-plugin-ejoy-populate': {
    config: {
      defaultDepth: 3, // Default is 5
    }
  },
});
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago