Skip to content

Commit e3c6ec1

Browse files
committed
Add test to check how we handle infinite recursion
1 parent db589b7 commit e3c6ec1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/validation/__tests__/MaxIntrospectionDepthRule-test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,4 +536,19 @@ describe('Validate: Max introspection nodes rule', () => {
536536
}
537537
`);
538538
});
539+
540+
it("doesn't infinitely recurse on fragment cycle", () => {
541+
expectValid(`
542+
query test {
543+
__schema {
544+
types {
545+
...Cycle
546+
}
547+
}
548+
}
549+
fragment Cycle on __Type {
550+
...Cycle
551+
}
552+
`);
553+
});
539554
});

0 commit comments

Comments
 (0)