diff --git a/src/graph.js b/src/graph.js
index <HASH>..<HASH> 100644
--- a/src/graph.js
+++ b/src/graph.js
@@ -293,6 +293,10 @@ function addEdge(
   if (undirected)
     data.undirected = true;
 
+  // Storing whether the id was generated
+  if (mustGenerateId)
+    data.generatedId = true;
+
   // Adding the edge to the internal register
   graph._edges.set(edge, data);
Storing whether the id was generated