Node
Kind: class
Source: src/graphrefly/_facade.py:565
Signature
Section titled “Signature”Node(graph: Graph, node_id: str)Description
Section titled “Description”A typed handle to one node of a graph.
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
name | str | Return the node’s name, its id in the graph. |
has_value | bool | Return whether this node retains a DATA value. |
status | NodeStatus | Return the node’s derived status: cache, output and lifecycle. |
Methods
Section titled “Methods”cache(default: object = _NO_DEFAULT) -> objectReturn the latest retained DATA value, or default when it holds none.
Source: src/graphrefly/_facade.py:584
subscribe
Section titled “subscribe”subscribe(callback: Callable[[Array[T]], object]) -> SubscriptionSubscribe to this node: callback gets each array as a tuple of messages.
The first array is START followed by the node’s snapshot. A callback that
raises goes to the graph’s reporter as a SubscriberCallbackError; it is not
the node’s ERROR, and nothing keeps it.
Source: src/graphrefly/_facade.py:611