naive implementation of AddGraphEdge