# fromNetworkGraph

Canonical: https://docs.shumoku.dev/en/library/api/fromNetworkGraph
Language: en

@shumoku/core · 0.4.2 · function

# fromNetworkGraph

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/models/network-model-from-graph.ts#L29)

Splits a drawn graph back into its configuration and layers: the inverse of \`toNetworkGraph\` for what the configuration can say. A node drawn for a segment becomes the segment again.

```
fromNetworkGraph(graph: NetworkGraph): NetworkModel
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `graph` | `NetworkGraph` | No additional description. | `—` |

## Returns

```
NetworkModel
```

[`libs/@shumoku/core/src/libs/@shumoku/core/src/models/network-model-from-graph.ts:29`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/models/network-model-from-graph.ts#L29)
