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

Interface MutableGraphSource

packages/graph/src/Graph.ts:185–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 * for mutation operations instead of runtime duck-typing checks.
184 */
185export interface MutableGraphSource<TSchema extends GraphSchema> extends GraphSource<TSchema> {
186 /**
187 * Add a vertex to the graph.
188 */
189 addVertex<TVertexLabel extends VertexLabel<TSchema>>(
190 label: TVertexLabel,
191 properties: VertexProperties<TSchema, TVertexLabel>,
192 ): Vertex<TSchema, TVertexLabel>;
193
194 /**
195 * Add an edge between two vertices.
196 * @param outV The source vertex (where the edge originates from).
197 * @param label The label of the edge.
198 * @param inV The target vertex (where the edge points to).
199 * @param properties The properties of the edge.
200 */
201 addEdge<TEdgeLabel extends EdgeLabel<TSchema>>(
202 outV: ElementId | Vertex<TSchema, any>,
203 label: TEdgeLabel,
204 inV: ElementId | Vertex<TSchema, any>,
205 properties: EdgeProperties<TSchema, TEdgeLabel>,
206 ): Edge<TSchema, TEdgeLabel>;
207
208 /**
209 * Delete a vertex from the graph.
210 */
211 deleteVertex(id: ElementId | Vertex<TSchema, any>): void;
212
213 /**
214 * Delete an edge from the graph.
215 */
216 deleteEdge(id: ElementId | Edge<TSchema, any>): void;
217}
218
219export interface EmptyGraphSourceConfig<TSchema extends GraphSchema> {
220 schema: TSchema;

Callers 27

pushMethod · 0.65
handleAsyncTransactionFunction · 0.65
createDemoGraphFunction · 0.65
traverseMethod · 0.65
traverseMethod · 0.65
addVertexMethod · 0.65
indexes.test.tsFile · 0.65
pushMethod · 0.65
handleAsyncTransactionFunction · 0.65
createDemoGraphFunction · 0.65
traverseMethod · 0.65

Implementers 3

Graphpackages/graph/src/Graph.ts
InMemoryGraphStoragepackages/graph/src/GraphStorage.ts
YGraphStoragepackages/y-graph-storage/src/YGraphSto

Calls

no outgoing calls

Tested by

no test coverage detected