---
title: "updateNode(_:forKey:)"
framework: Compute Graph
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "computegraph/computenodegraph/updatenode(_:forkey:)"
---

# updateNode(_:forKey:)

Updates an existing node in the graph.

## Declaration

```swift
mutating func updateNode(_ node: ComputeNodeGraph.Node, forKey nodeID: ComputeNodeGraph.NodeID) throws
```

## Parameters

- `node`: The updated node data.

## Discussion

Discussion note: If the node cannot be updated.
