@@ -4,12 +4,12 @@ import type { ASTNode } from '../../language/ast.js';
44import { Kind } from '../../language/kinds.js' ;
55import type { ASTVisitor } from '../../language/visitor.js' ;
66
7- import type { ValidationContext } from '../ValidationContext.js' ;
7+ import type { ASTValidationContext } from '../ValidationContext.js' ;
88
99const MAX_LISTS_DEPTH = 3 ;
1010
1111export function MaxIntrospectionDepthRule (
12- context : ValidationContext ,
12+ context : ASTValidationContext ,
1313) : ASTVisitor {
1414 /**
1515 * Counts the depth of list fields in "__Type" recursively and
@@ -30,7 +30,7 @@ export function MaxIntrospectionDepthRule(
3030 }
3131 const fragment = context . getFragment ( fragmentName ) ;
3232 if ( ! fragment ) {
33- // Missing fragments checks are handled by the `KnownFragmentNamesRule`.
33+ // Missing fragments checks are handled by `KnownFragmentNamesRule`.
3434 return false ;
3535 }
3636
@@ -50,7 +50,6 @@ export function MaxIntrospectionDepthRule(
5050 if (
5151 node . kind === Kind . FIELD &&
5252 // check all introspection lists
53- // TODO: instead of relying on field names, check whether the type is a list
5453 ( node . name . value === 'fields' ||
5554 node . name . value === 'interfaces' ||
5655 node . name . value === 'possibleTypes' ||
0 commit comments