---
title: connectedNodes
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkgraphnode/connectednodes
---

# connectedNodes

The list of other nodes connected to this node.

## Declaration

```swift
var connectedNodes: [GKGraphNode] { get }
```

## Discussion

Discussion In GameplayKit, the connections between nodes in a graph are directional. For example, if the connectedNodes list of Node A contains Node B, then a traveler on the graph can move directly from Node A to Node B. For the reverse to also be true, the connectedNodes list of Node B must contain Node A. To conveniently create connections in both directions, use the bidirectional parameter of the addConnections(to:bidirectional:) method. For more information, see GameplayKit Programming Guide.

## See Also

### Working with Connections

- [addConnections(to:bidirectional:)](gameplaykit/gkgraphnode/addconnections(to:bidirectional:).md)
- [removeConnections(to:bidirectional:)](gameplaykit/gkgraphnode/removeconnections(to:bidirectional:).md)
