Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
};
const loadApisGraphqlConfig = appPath =>
loadUtils.loadFiles(appPath, 'api/**/config/*.graphql?(.js)');
const loadExtensions = async appPath =>
loadUtils.loadFiles(appPath, 'extensions/**/config/*.graphql?(.js)');
const loadLocalPluginsGraphqlConfig = async appPath =>
loadUtils.loadFiles(appPath, 'plugins/**/config/*.graphql?(.js)');