Make it possible to change the type of a graph