بنقرة واحدة
schema
// Schema storage and discovery in Graph Explorer, including SchemaStorageModel persistence, edge connections, incremental schema growth, and related Jotai atoms.
// Schema storage and discovery in Graph Explorer, including SchemaStorageModel persistence, edge connections, incremental schema growth, and related Jotai atoms.
Testing standards, patterns, and utilities for Graph Explorer including Vitest, DbState, renderHookWithState, test data factories, SPARQL test helpers, and backward compatibility testing for persisted data.
Git workflow conventions for Graph Explorer. Use when making commits, creating branches, or discussing version control practices.
Handle management of any GitHub related tasks, including creating or modifying issues, publishing a branch as a pull requests (or PRs), or creating or modifying sub-issues or child issues.
Database connector and explorer patterns for Gremlin, openCypher, and SPARQL, including the query template tag and escapeString usage.
Graph Explorer product overview including supported graph types, query languages, databases, key features, and high-level architecture.
React component patterns, hooks, naming conventions, and the query-language translation system for Graph Explorer.
| name | schema |
| description | Schema storage and discovery in Graph Explorer, including SchemaStorageModel persistence, edge connections, incremental schema growth, and related Jotai atoms. |
| tools | ["fs_read","code","grep","glob","web_search","web_fetch"] |
Schema discovery is expensive in both time and database compute, so the discovered schema is persisted in IndexedDB (via localforage) as a SchemaStorageModel. This acts as a persistent cache per connection.
Key files:
src/core/StateProvider/schema.ts — SchemaStorageModel type, Jotai atoms, and incremental update logicsrc/core/ConfigurationProvider/types.ts — EdgeConnection, VertexTypeConfig, EdgeTypeConfig, and related typessrc/hooks/useSchemaSync.ts — schema sync orchestrationsrc/connector/queries/edgeConnectionsQuery.ts — edge connection discoveryEdge connections (EdgeConnection[]) describe relationships between vertex types and are used by the Schema Explorer feature. Because the edge connection query can be expensive and unreliable, it runs separately from the main schema sync so that a failure only affects Schema Explorer — all other features work without edge connections.
The edgeConnections property on SchemaStorageModel has three meaningful states:
undefined — edge connections have not been successfully discovered (query not run or errored)[] (empty array) — query succeeded but no edge connections existIf the edge connection query fails, the error is stored in the schema via the edgeConnectionDiscoveryFailed flag.
As users explore the graph, queries may return vertex/edge types or attributes not present in the initial schema sync. These are automatically merged into the stored schema via updateSchemaFromEntities(), causing the schema to grow more complete over time.