Skip to main content

toNodesAndConnections

Stentor API Reference


Stentor API Reference / stentor-handler/src / toNodesAndConnections

Function: toNodesAndConnections()

toNodesAndConnections(graph): object

Defined in: packages/stentor-handler/src/HandlerGraph/toNodesAndConnections.ts:56

Convert a graph to nodes and connections, a format required for display within a GUI.

This format is required by https://github.com/lightsinthesky/react-node-graph

Parameters​

graph​

HandlerGraph

Returns​

object

nodes​

nodes: object

Index Signature​

[id: string]: Node

connections​

connections: object

Index Signature​

[id: string]: Connection