// add node data including ids
const nodeData = [{ id: 0 }, { id: 1 }, { id: 2 }]
graphBuilder.createNodesSource(nodeData, 'id')
// data for some edges that connect to the nodes using their ids
const edgeData = [
{ id: '0', sourceId: '0', targetId: '1' },
{ id: '1', sourceId: '0', targetId: '2' }
]
// create an edges source with id providers for sources and targets
const edgesSource = graphBuilder.createEdgesSource({
data: edgeData,
id: (item) => item.id,
sourceId: (item) => item.sourceId,
targetId: (item) => item.targetId
})