MCPcopy Create free account
hub / github.com/codemix/graph / relationships

Method relationships

packages/graph/src/Traversals.ts:172–181  ·  view source on GitHub ↗
(propertyName?: string)

Source from the content-addressed store, hash-verified

170 propertyName: TPropertyName,
171 ): GetTraversalPathEdgePropertyValues<TraversalPath<TParent, TValue, TLabels>, TPropertyName>;
172 public relationships(propertyName?: string) {
173 const relationships: unknown[] = [];
174 for (const step of this) {
175 if (!(step.value instanceof Edge)) {
176 continue;
177 }
178 relationships.push(propertyName ? step.property(propertyName as never) : step.value);
179 }
180 return relationships;
181 }
182
183 /**
184 * Return the number of edges/relationships in this path.

Callers 1

Calls 2

pushMethod · 0.45
propertyMethod · 0.45

Tested by

no test coverage detected