function readByGraph implemented