MCPcopy
hub / github.com/modelcontextprotocol/servers / deleteRelations

Method deleteRelations

src/memory/index.ts:172–180  ·  view source on GitHub ↗
(relations: Relation[])

Source from the content-addressed store, hash-verified

170 }
171
172 async deleteRelations(relations: Relation[]): Promise<void> {
173 const graph = await this.loadGraph();
174 graph.relations = graph.relations.filter(r => !relations.some(delRelation =>
175 r.from === delRelation.from &&
176 r.to === delRelation.to &&
177 r.relationType === delRelation.relationType
178 ));
179 await this.saveGraph(graph);
180 }
181
182 async readGraph(): Promise<KnowledgeGraph> {
183 return this.loadGraph();

Callers 2

index.tsFile · 0.80

Calls 2

loadGraphMethod · 0.95
saveGraphMethod · 0.95

Tested by

no test coverage detected