---
title: "addEdge(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "realitykit/shadergraph/addedge(_:)"
---

# addEdge(_:)

Adds an edge to the graph.

## Declaration

```swift
final func addEdge(_ edge: ShaderGraph.Edge) throws
```

## Discussion

Discussion note: If the edge is invalid for this graph.
