> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AddValidatedEdge

# Function: addValidatedEdge()

> **addValidatedEdge**(`graph`, `source`, `target`, `weight?`): `boolean`

Defined in: [graph.ts:676](https://github.com/resq-software/npm/blob/fe2e20ae9db8398a0db1e3218edaabb3cf7004d6/packages/dsa/src/graph.ts#L676)

Validates and adds an edge using Effect Schema (for string graphs)

## Parameters

### graph

[`Graph`](../classes/Graph)\<`string`>

### source

`string`

### target

`string`

### weight?

`number` = `1`

## Returns

`boolean`

True if edge was added successfully
