graphical theory and graph theory IO typecheck