Edge CRUD and Bulk Management

Create, list, update, and delete validated graph edges, including idempotent and bulk write paths.

Overview

Description

Edge CRUD and Bulk Management is the mutation surface for the universal Dots graph. It lets authorized callers create a validated relationship, create one only if it is absent, submit batches efficiently, and delete an edge through a lifecycle-aware path. Every operation is company-scoped and preserves the graph’s shared contracts rather than letting each product module write the polymorphic edge table directly.

The capability serves both interactive linking and high-volume platform producers. User-trust writes validate the requested verb and endpoint combination and report duplicates predictably. System importers receive a deliberately separate batch seam for trusted structural relationships, such as the thousands of file-to-symbol edges emitted during repo ingestion. Bulk insertion chunks values and uses conflict-safe persistence so retries return only genuinely inserted rows.

Selling Points

  • Gives users and integrations one consistent way to connect knowledge across modules.
  • Supports idempotent redraws without turning normal retries into duplicate failures.
  • Batches large structural graphs instead of paying one database round trip per edge.
  • Keeps authorization, validation, events, and row edge counts aligned with mutations.
  • Preserves deletion auditability and emits graph lifecycle events for downstream consumers.

User Story

As an integration developer, I can submit a set of relationships discovered from an import and safely retry the request after a network interruption. Dots inserts only missing pairs, tells me what actually landed, and keeps the affected rows’ graph counts correct without custom reconciliation code.

Extension Surface

The rating is automatable because stable service and HTTP surfaces can be driven by clients and jobs. packages/api/src/routes/edges.ts exposes create, bulk-create, list, and delete routes, while packages/knowledge-graph/src/service.ts supplies injected authorization, event, and executor seams. Callers can automate operations, but they cannot replace validation or obtain the private system-trust path from a user route.

Capabilities & Limits

Capabilities include strict create with duplicate detection, conflict-tolerant create-if-absent, chunked bulk insertion, edge reads, and lifecycle-aware delete. Trusted platform writers can use a bounded system batch adapter. Limits are intentional: edge verbs and endpoint kinds must pass the governed contract, system-only relationships cannot be forged by normal callers, and direct table deletion is outside the supported surface because it would bypass events and maintenance.

Implementation Map

  • packages/knowledge-graph/src/service.ts
  • packages/knowledge-graph/src/edges.ts
  • packages/knowledge-graph/src/validate.ts
  • packages/api/src/routes/edges.ts

Properties

Property
Value
product
dots-platform
extensibility
automatable
module
Repo Graph, SDK
packages
knowledge-graph, api
status
shipped
surface
api
summary
Create, list, update, and delete validated graph edges, including idempotent and bulk write paths.

Connections

Edge CRUD and Bulk Management · Explore connections

  • implemented bytoGraphService
  • implemented bytocreateInternalSystemEdgeWriter
  • complementstoBudgeted Graph Traversal
  • requirestoTyped Relationship Vocabulary
  • implemented bytopackages/knowledge-graph/src/edges.ts
  • implemented bytopackages/knowledge-graph/src/service.ts
  • implemented bytopackages/api/src/routes/edges.ts
  • complementsfromTyped Relationship Vocabulary
  • requiresfromBudgeted Graph Traversal
  • requiresfromEdge Lifecycle Automation

Connected Records10

Complements
Implemented by
createInternalSystemEdgeWriter
GraphService
packages/api/src/routes/edges.ts
packages/knowledge-graph/src/edges.ts
packages/knowledge-graph/src/service.ts
Requires
10 connections.