<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKGraphNode/removeConnections(to:bidirectional:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGraphNode(im)removeConnectionsToNodes:bidirectional:"
  },
  "title" : "removeConnections(to:bidirectional:)"
}
-->

# removeConnections(to:bidirectional:)

Removes the connections from this node to the specified nodes.

```
func removeConnections(to nodes: [GKGraphNode], bidirectional: Bool)
```

## Parameters

`nodes`

The nodes connected to this node whose connections are to be removed.

`bidirectional`

<doc://com.apple.documentation/documentation/Swift/true> to remove connections in both directions if they exist; <doc://com.apple.documentation/documentation/Swift/false> to remove only connections from this node to each of the specified nodes.

## Discussion

In GameplayKit, the connections between nodes in a graph are directional. For example, if the [`connectedNodes`](/documentation/GameplayKit/GKGraphNode/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`](/documentation/GameplayKit/GKGraphNode/connectedNodes) list of Node B must contain Node A. When calling this method to remove a connection from one node to another, use the `bidirectional` parameter to choose whether to automatically remove the reverse connection as well.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)