How to use the strapi/lib/load.findPackagePath function in strapi

To help you get started, we’ve selected a few strapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strapi / strapi / packages / strapi-plugin-graphql / hooks / graphql / load-config.js View on Github external
const loadPluginsGraphqlConfig = async installedPlugins => {
  const root = {};

  for (let pluginName of installedPlugins) {
    const pluginDir = loadUtils.findPackagePath(`strapi-plugin-${pluginName}`);

    const result = await loadUtils.loadFiles(
      pluginDir,
      'config/*.graphql?(.js)'
    );
    _.set(root, ['plugins', pluginName], result);
  }

  return root;
};

strapi

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite

SEE LICENSE IN LICENSE
Latest version published 2 years ago

Package Health Score

41 / 100
Full package analysis