Relation Graph fails to load for Glossary created via API
Affected module
UI
Describe the bug
The Relation Graph is not loading for the Glossary and the UI displays the error:
Error when Fetching Graph
This issue is observed only for this specific glossary. The glossary was created via API rather than through the UI.
To Reproduce
Navigate to Glossary Open the Relation Graph tab/view. Observe that the UI shows "Error when Fetching Graph".
Expected behavior
The Relation Graph should render successfully and display glossary relationships.
OS
No response
Python version
No response
OpenMetadata version
1.13.0
OpenMetadata Ingestion package version
No response
Additional context
No response
Pre-submission checklist
- [x] I searched for duplicate issues.
- [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.
Adding technical root cause for this issue.
Confirmed on 1.13.0 with Fuseki RDF backend. Glossary created via API with 772 terms.
The "Error when Fetching Graph" is a G6 graph library exception thrown during frontend merge of paginated results:
Error: Node already exists: <uuid>
at xx.doAddNode (preset-JuqFHPcb.js)
at jW.addData
The frontend fetches three pages (offset=0, offset=500, offset=1000), all returning HTTP 200. During merge, a node UUID present in multiple pages is passed to G6 addNodes twice, causing a hard throw caught by the React error boundary and displayed as "Error when Fetching Graph".
Root cause of duplicate nodes: The RDF sink does not write skos:broader / skos:narrower triples from the glossary parent hierarchy. Parent/child position is stored only as a JSON literal via om:parent. SPARQL confirms:
SELECT DISTINCT ?p (COUNT(*) AS ?c)
WHERE {
GRAPH ?g {
?s ?p ?o .
FILTER(CONTAINS(STR(?s), 'glossaryTerm'))
}
}
GROUP BY ?p ORDER BY DESC(?c)
Results: om:parent — 764 occurrences (JSON literal). skos:broader — 231 occurrences (only from explicitly defined relatedTerms via UI).
533 terms have a parent in the hierarchy but no skos:broader triple. These appear as isolated nodes across all three pagination pages. The frontend merges them without deduplication before passing to G6.
Secondary symptom: Individual term Relations tab is also empty for all 533 affected terms — the tab queries for skos:broader and finds nothing.
Fix needed in two places:
- RDF sink: derive
skos:broader/skos:narrowerfrom glossary hierarchy at index time - Frontend: deduplicate nodes before passing merged paginated results to G6
addData
Related: #29211 (same RDF sink component, different entity types)