Lists the nodes that declare a given object type, in node-id order. The type index is maintained from each node’s declared object_type, so this works whether the ontology is draft or frozen. Accepts a limit, an exclusive cursor, and as_of for time travel.
Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.
Examples
List nodes of a given object type.
CLI
$ strata graph create g
$ strata graph add-node g a --object-type person
$ strata graph add-node g b --object-type person
$ strata graph nodes-by-type g person
Wire
{"graph":"g","type":"graph_create"}
{"graph":"g","node_id":"a","object_type":"person","type":"graph_add_node"}
{"graph":"g","node_id":"b","object_type":"person","type":"graph_add_node"}
{"graph":"g","object_type":"person","type":"graph_nodes_by_type"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
as_of | integer | no | Optional timestamp in microseconds. Reads the graph state visible at that instant. |
cursor | string | no | Optional exclusive node id cursor. |
graph | string | yes | Graph name. |
limit | integer | no | Optional item limit. Defaults to 100. |
object_type | string | yes | Object type name. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
Page<GraphNodeDataOutput, String>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_namenot_found.engine.graphinvalid_argument.engine.graph_type_nameinvalid_argument.engine.graph_node_id
Invocation
- CLI:
strata graph nodes-by-type - Wire type:
graph_nodes_by_type