graph

sample

Sample graph nodes.

strata graph sample

wire graph_sample

Returns a deterministic representative sample of nodes from a graph: the total live node count and up to `count` nodes (default 10), evenly strided over the ordered node ids. Latest state only.

Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.

To see the complete help for this command, run:

strata graph sample --help

Example

A representative sample of nodes plus the total count.

strata graph create gstrata graph add-node g astrata graph add-node g bstrata graph sample g

Parameters

NameTypeRequiredDescription
graphstringyesGraph name.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
countinteger or nullnoOptional sample count. Defaults to 10.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

SamplePage<GraphNodeDataOutput>

  • dataobject

    Shared pagination continuation facts.

  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

CodeRetryCommit outcome
failed_precondition.engine.runtime_closednevernot_started
not_found.engine.branchnevernot_applicable
invalid_argument.engine.product_spacenevernot_started
invalid_argument.engine.graph_namenevernot_started
not_found.engine.graphnevernot_applicable
← All 31 Graph commands

agents: this page as markdown → /docs/reference/graph/sample.md