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

# updateNode(_:forKey:)

Replaces the node stored under the given name.

## Declaration

```swift
final func updateNode(_ node: ShaderGraph.Node, forKey name: String) throws
```

## Discussion

Discussion Any existing edges referencing name are preserved and will refer to the updated node.
