How to use the strapi/lib/load.loadFiles 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;
};
github strapi / strapi / packages / strapi-plugin-graphql / hooks / graphql / load-config.js View on Github external
const loadApisGraphqlConfig = appPath =>
  loadUtils.loadFiles(appPath, 'api/**/config/*.graphql?(.js)');
github strapi / strapi / packages / strapi-plugin-graphql / hooks / graphql / load-config.js View on Github external
const loadExtensions = async appPath =>
  loadUtils.loadFiles(appPath, 'extensions/**/config/*.graphql?(.js)');
github strapi / strapi / packages / strapi-plugin-graphql / hooks / graphql / load-config.js View on Github external
const loadLocalPluginsGraphqlConfig = async appPath =>
  loadUtils.loadFiles(appPath, 'plugins/**/config/*.graphql?(.js)');

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 1 year ago

Package Health Score

41 / 100
Full package analysis