nodeTypes = new Set(['Corporation', 'Trust'])
function* nodes(): Generator<EntityData, void, unknown> {
for (const entity of data.nodesSource) {
if (entity.type && nodeTypes.has(entity.type)) {
yield entity as EntityData
}
}
}
return graphBuilder.createNodesSource(nodes, 'id')