tigergraph__add_edge
Adds an edge between two existing vertices in a TigerGraph graph, with optional edge attributes.
Instructions
Add a single edge (relationship) to a TigerGraph graph connecting two vertices.
Use When: • Creating a relationship between two entities • Connecting vertices in the graph • Building graph structure • Adding individual relationships
Quick Start:
{
"source_vertex_type": "Person",
"source_vertex_id": "user1",
"edge_type": "FOLLOWS",
"target_vertex_type": "Person",
"target_vertex_id": "user2",
"attributes": {"since": "2024-01-15"}
}Common Workflow:
Ensure both source and target vertices exist (use 'add_node')
Call 'add_edge' to create relationship
Optionally add edge attributes (like timestamps)
Verify with 'get_neighbors' or 'get_node_edges'
Tips: • Both vertices must exist before adding edge • Edge type must match schema definition • For multiple edges, use 'add_edges' (more efficient) • Edge attributes are optional
Related Tools: add_edges, add_node, get_neighbors, delete_edge
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Connection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles. | |
| edge_type | Yes | Type of the edge. | |
| attributes | No | Edge attributes. Example: {'weight': 0.5, 'date': '2023-01-01'} | |
| graph_name | No | Name of the graph. If not provided, uses default connection. | |
| source_vertex_id | Yes | ID of the source vertex. | |
| target_vertex_id | Yes | ID of the target vertex. | |
| source_vertex_type | Yes | Type of the source vertex. | |
| target_vertex_type | Yes | Type of the target vertex. |