Fix a bug that would throw a type error in `GraphEdge` in some cases