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

# validateAddingEdge(_:)

Validates that an edge can be added to the graph without adding it, throwing a descriptive error if not.

## Declaration

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

## Discussion

Discussion Use canAddEdge(_:) instead when only a yes/no answer is needed.
