---
title: "canAddNode(_:)"
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/canaddnode(_:)"
---

# canAddNode(_:)

Returns whether the given node can be added to the graph.

## Declaration

```swift
func canAddNode(_ node: ComputeNodeGraph.Node) -> Bool
```

## Parameters

- `node`: The node to test.

## Return Value

Return Value true if calling addNode(_:) with this node would succeed.

## Discussion

Discussion This is the non-throwing preflight check for addNode(_:). Use it to validate a node — for example, to gate UI affordances — without modifying the graph.
