Add a type attirbute to graphs