detachRelation
Remove relationships between a source record and target records, optionally by relation type and direction. Detach outgoing, incoming, or bidirectional graph links to clean up record connections.
Instructions
Remove the relationships between a record and target records. Without relationType it removes relationships of every type; with direction "bidirectional" it removes them both ways. Not available inside a transaction. Use findRelationships to inspect existing relationships and confirm the correct type/direction before detaching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceId | Yes | ID of the source record | |
| targetId | No | ID of one target record (deprecated if targetIds provided) | |
| direction | No | Direction of the relationship | outgoing |
| targetIds | No | IDs of multiple target records | |
| relationType | No | Type of the relationship to remove; omit to remove every type |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| success | Yes |