---
title: "AddEdgeDefinitionBody"
description: "The `AddEdgeDefinitionBody` entity."
section: "Reference"
group: "Types"
order: 1
---

## Definition

```ts
interface AddEdgeDefinitionBody {
  graphDefinitionId: string;
  fromSchemaId: string;
  toSchemaId: string;
  schemaId?: string | undefined;
  description?: string | undefined;
}
```

## Fields

| Field               | Type                  | Notes                                                      |
| ------------------- | --------------------- | ---------------------------------------------------------- |
| `graphDefinitionId` | `string`              | `required` — Graph definition this edge type belongs to.   |
| `fromSchemaId`      | `string`              | `required` — Schema ID of the source node                  |
| `toSchemaId`        | `string`              | `required` — Schema ID of the target node                  |
| `schemaId`          | `string \| undefined` | `optional` — Schema ID for the edge properties             |
| `description`       | `string \| undefined` | `optional` — Human-readable description of this edge type. |
