function buildRefGraph()

in tools/src/cycleCheck.ts [35:45]


function buildRefGraph(schema: object) {
  const root = new SchemaRefNode();
  findRefs(schema, root);
  for (const schemaRef of Object.keys(root.children)) {
    const childNode = root.children[schemaRef];
    const childSchema = findByRef(schema, schemaRef);
    findRefs(childSchema, childNode);
  }

  return root;
}