Skip to content

Commit 7b64ef2

Browse files
gvelez17claude
andcommitted
Fix 'Unknown' showing in edge click modal
When clicking edges in the graph, the modal was showing "Unknown is the subject of..." because the backend optimizes responses by not duplicating node data - edgesFrom only includes endNode (current node IS startNode), and edgesTo only includes startNode (current node IS endNode). Now the frontend fills in the missing node reference when creating edge data, so the modal can display proper names. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 5b222fe commit 7b64ef2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/containers/Explore/graph.utils.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ const parseSingleNode = (
288288
target: e.endNodeId.toString(),
289289
relation: edgeLabel,
290290
label: edgeLabel,
291-
raw: e,
291+
raw: {
292+
...e,
293+
// For edgesFrom, the current node IS the startNode (backend omits it to save data)
294+
startNode: e.startNode || node
295+
},
292296
color: edgeStyle.color,
293297
width: edgeStyle.width,
294298
arrow: edgeStyle.arrow,
@@ -339,7 +343,11 @@ const parseSingleNode = (
339343
target: e.endNodeId.toString(),
340344
relation: edgeLabel,
341345
label: edgeLabel,
342-
raw: e,
346+
raw: {
347+
...e,
348+
// For edgesTo, the current node IS the endNode (backend omits it to save data)
349+
endNode: e.endNode || node
350+
},
343351
color: edgeStyle.color,
344352
width: edgeStyle.width,
345353
arrow: edgeStyle.arrow,

0 commit comments

Comments
 (0)