MCPcopy Create free account
hub / github.com/codemix/graph / getVertexMap

Method getVertexMap

packages/y-graph-storage/src/YGraphStorage.ts:384–392  ·  view source on GitHub ↗
(vertexId: ElementId)

Source from the content-addressed store, hash-verified

382 }
383
384 protected getVertexMap(vertexId: ElementId): Y.Map<unknown> {
385 const [label, uuid] = parseElementId(vertexId);
386 const collection = this.getVertexCollectionMap(label);
387 const data = collection.get(uuid);
388 if (data == null) {
389 throw new VertexNotFoundError(vertexId);
390 }
391 return data as Y.Map<unknown>;
392 }
393 protected getEdgeMap(edgeId: ElementId): Y.Map<unknown> {
394 const [label, uuid] = parseElementId(edgeId);
395 const collection = this.getEdgeCollectionMap(label);

Callers 3

deleteVertexMethod · 0.95
addEdgeMethod · 0.95
deleteEdgeMethod · 0.95

Calls 3

parseElementIdFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected