Skip to content

A patched version of the plugin that fixes the issue of fields with the same name

Notifications You must be signed in to change notification settings

techmagic-team/strapi-plugin-populate-deep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strapi plugin populate-deep

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

Installation

npm install strapi-plugin-populate-deep

yarn add strapi-plugin-populate-deep

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-populate-deep': {
    config: {
      defaultDepth: 3, // Default is 5
    }
  },
});

Contributions

The original idea for getting the populate structure was created by tomnovotny7 and can be found in this github thread

About

A patched version of the plugin that fixes the issue of fields with the same name

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%