traverseEdges method
Traverses edges starting from this revision.
direction is one of pb.EdgeDirection.OUTGOING (default),
pb.EdgeDirection.INCOMING, or pb.EdgeDirection.BOTH.
edgeTypes optionally filters by edge type (see EdgeType).
final results = await revision.traverseEdges(
direction: pb.EdgeDirection.OUTGOING,
edgeTypes: [EdgeType.dependsOn],
maxDepth: 3,
);
Implementation
Future<List<Kref>> traverseEdges({
pb.EdgeDirection direction = pb.EdgeDirection.OUTGOING,
List<String>? edgeTypes,
int maxDepth = 10,
int limit = 100,
bool includePath = false,
}) async {
final response = await client.traverseEdges(
kref.uri,
direction,
edgeTypeFilter: edgeTypes,
maxDepth: maxDepth,
limit: limit,
includePath: includePath,
);
return response.revisionKrefs.map((k) => Kref(k.uri)).toList();
}