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;
};