Subgraph & Node Relations

Child-, Parent- and Reference-Nodes 

Neos 9

This page is for Neos 9.0 with the new Event Sourced Content Repository.

Nodes are almost always connected with each other. Subgraphs are the structural model connecting nodes via various types of relations.

A restricted perspective

Subgraphs only describe a subset of all existing nodes. They reduce the total set by applying variant filters (see Dimensions) and visibility constraints, e.g. subtree tags (see below).

#Hierarchy (Child- and Parent-Nodes)

The content repository provides a directed, hierarchical structure, where nodes may have a single parent and an arbitrary number of children. Nodes without a parent are called root nodes. The hierarchical relation between parent and child may optionally be named.

root
root
child
child
some-name
some-name
named child
named child
Text is not SVG - cannot display

A subgraph consisting of three nodes; A root node with an unnamed child node and a child node with the relation named "some-name"

#Tethered Nodes

A special case for named relations are tethered Nodes. They are attached to their parent node and always carry a name. Neos e.g. uses this to denote a content collection as the page's main one.

#References

In addition to hierarchy, there may also be references between nodes. References are always named, can be resolved in both directions and may haves properties of their own. Their purpose is to describe what content is related to what other content and the meaning and intention of the relation.

root
root
reference
name
reference...
{"description": "some-text"}
{"description": "some-text"}
some node
some node
another node
another no...
Text is not SVG - cannot display

A subgraph consisten of three nodes and two of them connected via a reference named "reference name" and having a description property

#Subtree Tags

A node and all of its hierarchical descendants within a subgraph form a subtree. To declare a characteristic that is shared within the whole subtree, the node can be assigned a subtree tag that then affects all its descendants.

root
root
some
tag
some...
node
node
some child
some child
another child
another ch...
grand-child
grand-child
node sibling
node sibli...
Text is not SVG - cannot display

A subgraph consisting of five nodes and one declaring subtree tag "some tag" explicitly, affecting itself and all of its descendants via inheritance. Any child node like "some child" can also declare the tag additionally explicitly.

#Visibility constraints

The subgraphs perspective can be restricted to exclude specifically tagged subtrees. Neos uses subtree tags e.g. for disabling nodes or internally for soft removal. A subgraph excluding the subtree tag "some tag" contains only two nodes:

root
root
node sibling
node sibli...
Text is not SVG - cannot display