in tools/src/cycleCheck.ts [47:57]
export function findCycle(schema: object) {
const root = buildRefGraph(schema);
for (const schemaRef of Object.keys(root.children)) {
const cycle = findDependencyCycle(schemaRef, root);
if (cycle) {
return [schemaRef, ...cycle];
}
}
return;
}