Skip to content

Graph files adjustments#8

Merged
PabloZaiden merged 5 commits into
mainfrom
graph-files-adjustments
May 3, 2026
Merged

Graph files adjustments#8
PabloZaiden merged 5 commits into
mainfrom
graph-files-adjustments

Conversation

@PabloZaiden

Copy link
Copy Markdown
Owner

This pull request introduces a significant update to how graph data is stored and referenced, shifting from a data/graph directory to a hidden .data/graph directory. It also updates related documentation and environment variables to reflect this change. Additionally, it removes all example node and edge type JSON files from the repository, which likely signals a move to dynamic or user-defined schemas.

Key changes:

Data Directory Structure and Environment Variables

  • Changed the base data directory from data/graph to .data/graph throughout the codebase and documentation, making the data storage location hidden by default. Updated the relevant environment variable from LINK_GRAPH_PATH to LINK_DATA_DIR and adjusted the Dockerfile and Docker instructions accordingly. [1] [2] [3] [4] [5]

Removal of Example Node and Edge Type Schemas

Documentation Updates

  • Updated the README.md to reflect the new data directory (.data/graph), environment variable (LINK_DATA_DIR), and adjusted all usage and example commands accordingly for both local and Docker usage. [1] [2] [3] [4]

Copilot AI review requested due to automatic review settings May 3, 2026 15:42
@PabloZaiden
PabloZaiden merged commit a93a3f6 into main May 3, 2026
1 check passed
@PabloZaiden
PabloZaiden deleted the graph-files-adjustments branch May 3, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Link’s on-disk graph storage defaults to use a hidden data directory (.data/graph) and aligns configuration, docs, and container defaults with the new layout. It also removes the checked-in example graph schema JSON files (relying on runtime bootstrap) and adjusts MCP tooling to avoid empty input schemas.

Changes:

  • Switch default graph location to ./.data/graph and replace LINK_GRAPH_PATH/GRAPH_PATH with LINK_DATA_DIR.
  • Update Docker/README to use the new data directory conventions.
  • Remove committed example node/edge type JSON files and add/extend tests to cover CRUD and MCP HTTP lifecycle.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/server/config.ts Default graph path now derived from LINK_DATA_DIR (defaults to ./.data) and uses <dataDir>/graph.
src/server/config.test.ts Updates config tests for the new default path and env var.
src/mcp/server.ts Replaces empty get_graph input schema with a compatibility placeholder field.
src/index.ts --validate now validates config.graphPath only (CLI --graph-path override removed).
src/api/http.test.ts Adds broader HTTP CRUD coverage and MCP HTTP lifecycle test via SDK client.
README.md Documents .data/graph default, LINK_DATA_DIR, and updated local/docker commands.
Dockerfile Sets LINK_DATA_DIR=/data and creates /data in the image.
data/graph/node-types/technology.json Removed example node type file.
data/graph/node-types/team.json Removed example node type file.
data/graph/node-types/project.json Removed example node type file.
data/graph/node-types/product.json Removed example node type file.
data/graph/node-types/product-group.json Removed example node type file.
data/graph/node-types/person.json Removed example node type file.
data/graph/node-types/other.json Removed example node type file.
data/graph/node-types/org.json Removed example node type file.
data/graph/node-types/issue.json Removed example node type file.
data/graph/node-types/info.json Removed example node type file.
data/graph/node-types/customer.json Removed example node type file.
data/graph/node-types/aka.json Removed example node type file.
data/graph/edge-types/works-on.json Removed example edge type file.
data/graph/edge-types/status-for.json Removed example edge type file.
data/graph/edge-types/related-to.json Removed example edge type file.
data/graph/edge-types/owns.json Removed example edge type file.
data/graph/edge-types/member-of.json Removed example edge type file.
data/graph/edge-types/knows-about.json Removed example edge type file.
data/graph/edge-types/depends-on.json Removed example edge type file.
data/graph/edge-types/alias-of.json Removed example edge type file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.ts
Comment on lines 7 to +11
if (Bun.argv.includes("--validate")) {
const config = loadConfig();
const graphPath = argValue("--graph-path") ?? config.graphPath;
try {
validateGraphPath(graphPath);
console.log(`Graph data is valid: ${graphPath}`);
validateGraphPath(config.graphPath);
console.log(`Graph data is valid: ${config.graphPath}`);
Comment thread README.md
Comment on lines 55 to +59
1. `git pull`.
2. Run Link locally and edit through the UI, HTTP API, or MCP tools.
3. Inspect JSON changes under `data/graph`.
4. `bun src/index.ts --validate --graph-path ./data/graph`.
5. `git add data/graph && git commit`.
3. Inspect JSON changes under `.data/graph`.
4. `bun src/index.ts --validate`.
5. `git add .data/graph && git commit`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants