Skip to content

Auto-load graph-explorer-config.json on startup #1451

@jeremy-london

Description

@jeremy-london

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:

  1. Proxy Server: Serve graph-explorer-config.json from CONFIGURATION_FOLDER_PATH (similar to defaultConnection.json)

    • Add route: GET /graph-explorer-config.json
    • Serve file from: ${CONFIGURATION_FOLDER_PATH}/graph-explorer-config.json
  2. 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
  3. 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 works
  • graph-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

Metadata

Metadata

Assignees

No one assigned

    Labels

    customizationCustomization options for rendering graph data in non-default waysenhancementNew feature or requestinfrastructuresharingIssues related to sharing parts of graph explorer with other usersusabilityIssues relating to the ease of use of the UI or features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions