# Graph.addEdge() method · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.graph.addedge/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

Adds edges from one vertex to others.

**Signature:**

```typescript
addEdge(fromVertex: T, ...toVertex: T[]): Graph<T>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| fromVertex | T | Vertex the edges start from. |
| toVertex | T\[\] | Vertices they point at. |


**Returns:**

[Graph](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.graph/)<T>

This graph, for chaining.

## Remarks

Directed: only `fromVertex` records them. It is added to the graph first if it is not there yet, while the targets are not — an edge may point at a vertex the graph does not otherwise know. Duplicate edges are kept as duplicates.

