Rewrite the Graph, Edge, and Vertex types.