Skip to content

GraphService

Core graph CRUD operations.

Proto source

graph/graph.proto

Transport

All methods are available via:

  • gRPC on port 7080 — native high-performance API
  • REST/JSON on port 7081 — HTTP/JSON transcoding via embedded structured-proxy

Methods

CreateNode

Create a new node with the given labels and properties.

HTTP: POST /v1/graph/nodes

Request: CreateNodeRequest

FieldTypeDescription
labelsstring[]
propertiesmap<string, PropertyValue>

Response: Node

FieldTypeDescription
node_iduint64Raw 64-bit node identifier. Preserved for Neo4j v4 driver compatibility and direct internal addressing. New client code SHOULD prefer element_id.
labelsstring[]
propertiesmap<string, PropertyValue>
element_idstringCanonical opaque identifier: 13-character Crockford base32 encoding of node_id (bijective). Stable across schema changes, restarts, replication. Use this as the primary node reference in application code per ADR-022.

CreateNodesBatch

Create N nodes in a single transaction. Server batches secondary index updates (HNSW graph builds, full-text posting list appends, B-tree entries) so a bulk load of M nodes carrying vector or text properties costs one index write per index, not M. The whole batch is atomic: either every node is created or none are. Created nodes are returned in input order.

HTTP: POST /v1/graph/nodes:batch

Request: CreateNodesBatchRequest

FieldTypeDescription
nodesCreateNodeRequest[]Nodes to create, in caller-defined order. Each entry has the same semantics as a single CreateNodeRequest. Server returns the created nodes in the same order via CreateNodesBatchResponse.nodes. An empty list is a valid no-op and returns an empty response.

Response: CreateNodesBatchResponse

FieldTypeDescription
nodesNode[]Created nodes, in the same order as CreateNodesBatchRequest.nodes. Length matches the request's nodes length on success.

GetNode

Get a node by its ID.

HTTP: GET /v1/graph/nodes/{node_id}

Request: GetNodeRequest

FieldTypeDescription
node_iduint64

Response: Node

FieldTypeDescription
node_iduint64Raw 64-bit node identifier. Preserved for Neo4j v4 driver compatibility and direct internal addressing. New client code SHOULD prefer element_id.
labelsstring[]
propertiesmap<string, PropertyValue>
element_idstringCanonical opaque identifier: 13-character Crockford base32 encoding of node_id (bijective). Stable across schema changes, restarts, replication. Use this as the primary node reference in application code per ADR-022.

CreateEdge

Create an edge between two nodes.

HTTP: POST /v1/graph/edges

Request: CreateEdgeRequest

FieldTypeDescription
edge_typestring
source_node_iduint64
target_node_iduint64
propertiesmap<string, PropertyValue>

Response: Edge

FieldTypeDescription
edge_iduint64
edge_typestring
source_node_iduint64
target_node_iduint64
propertiesmap<string, PropertyValue>
element_idstringCanonical opaque identifier for the edge endpoints (concatenated source and target element_ids in canonical order). Edges in CoordiNode are typed property bags between two nodes, not first-class entities — this field exists for parity with Neo4j relationships, not as a stable handle.

Traverse

Traverse edges from a starting node.

HTTP: POST /v1/graph/traverse

Request: TraverseRequest

FieldTypeDescription
start_node_iduint64
edge_typestring
directionTraversalDirectionOUTBOUND, INBOUND, or BOTH.
max_depthuint32
paginationPaginationRequest

Response: TraverseResponse

FieldTypeDescription
nodesNode[]
edgesEdge[]
paginationPaginationResponse

Types

CreateEdgeRequest

FieldTypeDescription
edge_typestring
source_node_iduint64
target_node_iduint64
propertiesmap<string, PropertyValue>

CreateNodeRequest

FieldTypeDescription
labelsstring[]
propertiesmap<string, PropertyValue>

CreateNodesBatchRequest

Bulk-create N nodes in one transaction. Same shape as N back-to-back CreateNode calls, but processed under a single server-side lock acquisition with deferred secondary-index commit at the end of the batch — primary win for vector-heavy bulk loads (HNSW write lock is taken once per batch, not once per node).

FieldTypeDescription
nodesCreateNodeRequest[]Nodes to create, in caller-defined order. Each entry has the same semantics as a single CreateNodeRequest. Server returns the created nodes in the same order via CreateNodesBatchResponse.nodes. An empty list is a valid no-op and returns an empty response.

CreateNodesBatchResponse

FieldTypeDescription
nodesNode[]Created nodes, in the same order as CreateNodesBatchRequest.nodes. Length matches the request's nodes length on success.

GetNodeRequest

FieldTypeDescription
node_iduint64

TraverseRequest

FieldTypeDescription
start_node_iduint64
edge_typestring
directionTraversalDirectionOUTBOUND, INBOUND, or BOTH.
max_depthuint32
paginationPaginationRequest

TraverseResponse

FieldTypeDescription
nodesNode[]
edgesEdge[]
paginationPaginationResponse

Enums

TraversalDirection

ValueNumberDescription
TRAVERSAL_DIRECTION_UNSPECIFIED0
TRAVERSAL_DIRECTION_OUTBOUND1
TRAVERSAL_DIRECTION_INBOUND2
TRAVERSAL_DIRECTION_BOTH3