useGraphPaths()
function useGraphPaths<T>(EntityType, options): RxDBResource<any[]>;
Defined in: hooks.ts:358
Find paths between two entities in a graph
Type Parameters
| Type Parameter |
|---|
T extends EntityType |
Parameters
| Parameter | Type | Description |
|---|---|---|
EntityType | T | The entity class |
options | UseOptions<EntityStaticType<T, "findPathsOptions">> | Path query options (fromId, toId, maxDepth, etc.) |
Returns
RxDBResource<any[]>
A reactive resource object containing paths
Example
const { value: paths } = useGraphPaths(User, {
fromId: 'user-1',
toId: 'user-2',
maxDepth: 5
});