const nodeData = [{ id: 0 }, { id: 1 }, { id: 2 }]
graphBuilder.createNodesSource(nodeData, 'id')
const edgeData = [
{ id: '0', sourceId: '0', targetId: '1' },
{ id: '1', sourceId: '0', targetId: '2' }
]
const edgesSource = graphBuilder.createEdgesSource({
data: edgeData,
id: (item) => item.id,
sourceId: (item) => item.sourceId,
targetId: (item) => item.targetId
})