Graph
Kind: class
Source: src/graphrefly/_facade.py:2589
Signature
Section titled “Signature”Graph(name: str | None = None)Description
Section titled “Description”Graph-first authoring facade over the native Rust engine.
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
closed | bool | Return whether this graph facade has been closed. |
Methods
Section titled “Methods”close() -> NoneClose this graph facade and release Python-owned resources.
Source: src/graphrefly/_facade.py:2629
checkpoint
Section titled “checkpoint”checkpoint() -> GraphCheckpointReturn a strict-JSON checkpoint for this graph.
Source: src/graphrefly/_facade.py:2640
reentry_queue
Section titled “reentry_queue”reentry_queue() -> GraphReentryQueueReturn this graph’s explicit owner-thread async re-entry queue.
Source: src/graphrefly/_facade.py:2653
retain
Section titled “retain”retain(node: Node[T], *, reason: str | None = None) -> RetainKeep a graph-local node active until the returned retain token is released.
Source: src/graphrefly/_facade.py:2665
state(value: T, name: str | None = None) -> Node[T]Create a writable graph state node with initial DATA.
Source: src/graphrefly/_facade.py:2693
producer
Section titled “producer”producer(callback: Callable[[], T] | None = None, name: str | None = None) -> Node[T] | Callable[[Callable[[], T]], Node[T]]Create or decorate a zero-dependency producer node.
Source: src/graphrefly/_facade.py:2723
derived
Section titled “derived”derived(deps: Iterable[Node[Any]], callback: Callable[..., U] | None = None, name: str | None = None) -> Node[U] | Callable[[Callable[..., U]], Node[U]]Create or decorate a value-level derived node over dependencies.
Source: src/graphrefly/_facade.py:2768
node(deps: Iterable[Node[Any]], callback: Callable[[Ctx], object] | None = None, name: str | None = None, *, partial: bool = False, complete_when_deps_complete: bool = True, error_when_deps_error: bool = True, terminal_as_real_input: bool = False, pausable: PausableMode = True, pull_id: str | None = None, restore: RestoreRef | None = None) -> Node[object] | Callable[[Callable[[Ctx], object]], Node[object]]Create or decorate an advanced Ctx-level graph node.
Source: src/graphrefly/_facade.py:2832
effect
Section titled “effect”effect(deps: Iterable[Node[Any]], callback: Callable[..., object] | None = None, name: str | None = None) -> Node[object] | Callable[[Callable[..., object]], Node[object]]Create or decorate a value-level effect node over dependencies.
Source: src/graphrefly/_facade.py:2931
batch(callback: Callable[[], object]) -> NoneRun synchronous graph mutations inside one native batch boundary.
Source: src/graphrefly/_facade.py:2961
describe
Section titled “describe”describe() -> dict[str, Any]Return the current JSON-serializable topology snapshot.
Source: src/graphrefly/_facade.py:2980
pause(node: Node[Any], lock_id: str) -> NonePause a graph-local node using a caller-provided lock id.
Source: src/graphrefly/_facade.py:2991
resume
Section titled “resume”resume(node: Node[Any], lock_id: str) -> NoneResume a graph-local node for the given lock id.
Source: src/graphrefly/_facade.py:3004
invalidate
Section titled “invalidate”invalidate(node: Node[Any]) -> NoneInvalidate a graph-local node through the public graph facade.
Source: src/graphrefly/_facade.py:3017
observe
Section titled “observe”observe(callback: Callable[[GraphEvent], object], *, on_error: ObserverErrorHandler | None = None) -> SubscriptionSubscribe to graph-level observation events.
Source: src/graphrefly/_facade.py:3029