-
Notifications
You must be signed in to change notification settings - Fork 80
Auto-load graph-explorer-config.json on startup #1451
Description
Description
When deploying Graph Explorer via Docker, users can export their configuration (connections, styles, schemas, etc.) using Settings → General → Save, which creates a graph-explorer-config.json file. Currently, this file must be manually loaded via the UI each time, even when mounted as a volume in Docker.
While defaultConnection.json is automatically loaded for connection settings, the full backup configuration file (graph-explorer-config.json) containing styles, schemas, and other customizations is not automatically loaded on startup.
I'm frustrated when I have to manually click "Load" in the Settings UI every time I access Graph Explorer, even though I've mounted the config file as a Docker volume. This makes it difficult to use infrastructure-as-code approaches and share configurations across team members.
Preferred Solution
Implement automatic loading of graph-explorer-config.json on application startup, similar to how defaultConnection.json is currently auto-loaded.
Proposed Implementation:
-
Proxy Server: Serve
graph-explorer-config.jsonfromCONFIGURATION_FOLDER_PATH(similar todefaultConnection.json)- Add route:
GET /graph-explorer-config.json - Serve file from:
${CONFIGURATION_FOLDER_PATH}/graph-explorer-config.json
- Add route:
-
Frontend Auto-Load: Before React initializes (in
storageAtoms.ts), check if:- No existing configuration exists in IndexedDB
- Backup config file is available at
/graph-explorer-config.json - If both conditions are met, automatically fetch and restore the backup using the existing
restoreBackup()function
-
Safety: Only auto-load if IndexedDB is empty (no existing user data) to avoid overwriting user configurations
Expected Behavior:
defaultConnection.json→ ✅ Auto-loads (connections only) - already worksgraph-explorer-config.json→ ✅ Auto-loads (full config) when IndexedDB is empty - new behavior
Additional Context
Current Behavior:
defaultConnection.json→ ✅ Auto-loads (connections only)graph-explorer-config.json→ ❌ Manual load required (full config with styles, schemas, etc.)
Docker Compose Example:
services:
graph-explorer:
volumes:
- ./config/graph-explorer:/graph-explorer-config
environment:
- CONFIGURATION_FOLDER_PATH=/graph-explorer-config