feat: add optional Grafeo graph database export#32
Conversation
Add a "Push to Grafeo" option in the Import/Export modal that materializes the current ontology as a live property graph in a Grafeo instance. Entity types become labeled nodes and relationships become typed edges, immediately queryable via GQL, Cypher, SPARQL, Gremlin, GraphQL, or SQL. - src/lib/grafeo.ts: Ontology-to-Cypher converter and REST client - src/lib/grafeo.test.ts: Unit tests for the conversion logic - src/components/GrafeoExportModal.tsx: Connection + push modal - Feature-flagged via VITE_ENABLE_GRAFEO_EXPORT (default: false)
|
@microsoft-github-policy-service agree |
|
Thanks for the contribution. Does Grafeo supports pushing to Fabric or how does it work on this setup? Do you deploy the playground locally, and push to grafeo there? |
|
Thanks @videlalvaro! No, Grafeo doesn't push to Fabric (yet) but the two are complementary, not a replacement. Grafeo sits before Fabric in the loop: Design (Playground) → Validate locally (Grafeo) → Push to production (Fabric IQ) The typical setup is fully local (but would work wherever you run the Playground):
The existing Fabric export path is completely untouched, this just adds an optional second target for fast local iteration. The whole feature is gated behind |
|
Hi @StevenBtw — the code looks great and merges cleanly. One small question before we land it: pingGrafeo currently verifies connectivity by sending POST /query with RETURN 1. Does Grafeo expose a dedicated health/status endpoint (e.g. GET /health or GET /status)? Using that would avoid creating an unnecessary graph transaction on connect. If not, the current approach is fine — just want to confirm before merging. |
Summary
Adds an optional "Push to Grafeo" export that materializes the current ontology as a live, queryable property graph, complementing the existing Fabric IQ export path with a local development backend.
src/lib/grafeo.ts: pure-function ontology-to-query converter + thin REST client (~130 LOC)src/lib/grafeo.test.ts: 7 unit tests covering conversion, edge cases, and escapingsrc/components/GrafeoExportModal.tsx: connection modal following the existing Fabric export patternVITE_ENABLE_GRAFEO_EXPORT(default:false); zero impact when disabledMotivation: accelerating the Fabric IQ design loop
Ontology Playground is a design and learning tool for Microsoft Fabric IQ: users build ontologies that ultimately power Fabric's natural-language query engine. Today the workflow is:
The gap is between steps 1 and 2: there's no way to validate an ontology as a live graph before pushing to Fabric. Designers either push incomplete ontologies to iterate, or reason about structure purely visually.
Grafeo fills this gap as a lightweight local backend:
Entity types become queryable nodes, relationships become typed edges. Designers can verify structure, trace join paths, and test cardinality, all locally, before touching Fabric.
Why Grafeo fits
Grafeo is an open-source (Apache-2.0), lightweight graph database built on the same open standards that Fabric IQ and the Playground already use:
Grafeo ships as a single ~7 MB binary: no JVM, no cluster, no cloud account required. Users can spin it up locally alongside the Playground for immediate ontology validation, then push to Fabric when ready.
How it works
/queryREST endpointTest plan
npm run buildpasses (TypeScript + Vite)npm testpasses: 259 tests (252 existing + 7 new), 0 failuresVITE_ENABLE_GRAFEO_EXPORT=false); no UI change