Graph

The Graph data type represents connected information.

Examples

`graph` argument of the "Dot to graph" adaptor

The "Dot to graph" adaptor produces a Graph from the graph argument.

Internal Structure

One common way to express a data graph is DOT format. Given the following DOT file:

graph.dot
graph {
A -- B;
A -- C;
B -- C;
C -- D;
}

An equivalent Graph would be structured as follows:

graph.json
{
nodes: [
{ id: 'A' },
{ id: 'B' },
{ id: 'C' },
{ id: 'D' }
],
edges: [
{
id: 'edge-1',
from: 'A',
to: 'B',
direction: 'none'
},
{
id: 'edge-2',
from: 'A',
to: 'C',
direction: 'none'
},
{
id: 'edge-3',
from: 'B',
to: 'C',
direction: 'none'
},
{
id: 'edge-4',
from: 'C',
to: 'D',
direction: 'none'
}
]
}