Graph: Replace a given vertex by ID