directed Graph api