File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
packages/graphql/lib/services Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,21 @@ export class BaseExplorerService {
11
11
if ( ! include || isEmpty ( include ) ) {
12
12
return [ ...modulesContainer . values ( ) ] ;
13
13
}
14
- const whitelisted = this . includeWhitelisted ( modulesContainer , include ) ;
15
- return whitelisted ;
14
+ const explicitlyWhitelisted = this . includeWhitelisted (
15
+ modulesContainer ,
16
+ include ,
17
+ ) ;
18
+ const modulesToInclude = [ ] ;
19
+ const toCheck = [ ...explicitlyWhitelisted ] ;
20
+ while ( toCheck . length ) {
21
+ const moduleRef = toCheck . pop ( ) ;
22
+ if ( ! modulesToInclude . includes ( moduleRef ) ) {
23
+ modulesToInclude . push ( moduleRef ) ;
24
+ toCheck . push ( ...moduleRef . imports ) ;
25
+ }
26
+ }
27
+
28
+ return modulesToInclude ;
16
29
}
17
30
18
31
includeWhitelisted (
You can’t perform that action at this time.
0 commit comments