Skip to content

Commit 4abf52f

Browse files
jakubnavratilkamilmysliwiec
authored andcommitted
feat(module): Recursive inclusion of modules
1 parent 6488c32 commit 4abf52f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/graphql/lib/services/base-explorer.service.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ export class BaseExplorerService {
1212
return [...modulesContainer.values()];
1313
}
1414
const whitelisted = this.includeWhitelisted(modulesContainer, include);
15-
return whitelisted;
15+
16+
const modules = [];
17+
const toCheck = [...whitelisted];
18+
while (toCheck.length) {
19+
const mod = toCheck.pop();
20+
if (!modules.includes(mod)) {
21+
modules.push(mod);
22+
toCheck.push(...mod.imports);
23+
}
24+
}
25+
26+
return modules;
1627
}
1728

1829
includeWhitelisted(

0 commit comments

Comments
 (0)