MCPcopy Create free account
hub / github.com/Brickgraph/fast-graph / delete_node

Function delete_node

app/graph/crud.py:180–197  ·  view source on GitHub ↗
(node_id: int)

Source from the content-addressed store, hash-verified

178# DELETE node in the graph
179@router.post('/delete/{node_id}')
180async def delete_node(node_id: int):
181
182 cypher = """
183 MATCH (node)
184 WHERE ID(node) = $node_id
185 DETACH DELETE node
186 """
187
188 with neo4j_driver.session() as session:
189 result = session.run(query=cypher,
190 parameters={'node_id': node_id})
191
192 node_data = result.data()
193
194 # Confirm deletion was completed by empty response
195 return node_data or {
196 'response': f'Node with ID: {node_id} was successfully deleted from the graph.'
197 }
198
199
200# RELATIONSHIPS

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected