File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ export function MaxIntrospectionDepthRule(
17
17
*/
18
18
function checkDepth (
19
19
node : ASTNode ,
20
- visitedFragments : { [ fragmentName : string ] : true } ,
20
+ visitedFragments : { [ fragmentName : string ] : true | undefined } ,
21
21
depth : number = 0 ,
22
22
) : boolean {
23
23
if ( node . kind === Kind . FRAGMENT_SPREAD ) {
24
24
const fragmentName = node . name . value ;
25
- if ( visitedFragments [ fragmentName ] ) {
25
+ if ( visitedFragments [ fragmentName ] === true ) {
26
26
// Fragment cycles are handled by `NoFragmentCyclesRule`.
27
27
return false ;
28
28
}
@@ -41,7 +41,7 @@ export function MaxIntrospectionDepthRule(
41
41
visitedFragments [ fragmentName ] = true ;
42
42
return checkDepth ( fragment , visitedFragments , depth ) ;
43
43
} finally {
44
- delete visitedFragments [ fragmentName ] ;
44
+ visitedFragments [ fragmentName ] = undefined ;
45
45
}
46
46
}
47
47
You can’t perform that action at this time.
0 commit comments