Skip to content

Commit 163785d

Browse files
committed
Add comment to parser about document directive
1 parent c472b9e commit 163785d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/language/parser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,10 @@ export class Parser {
253253
* - InputObjectTypeDefinition
254254
*/
255255
parseDefinition(): DefinitionNode {
256-
// TODO: I don't know what isConst represents. Every other callsite has it false
257256
const directives = this.parseDirectives(false);
257+
// If a document-level SemanticNullability directive exists as
258+
// the first element in a document, then all parsing will
259+
// happen in SemanticNullability mode.
258260
for (const directive of directives) {
259261
if (directive.name.value === 'SemanticNullability') {
260262
this._options.useSemanticNullability = true;

0 commit comments

Comments
 (0)