diff --git a/imports/client.tsx b/imports/client.tsx
index 2987b21b..825babe5 100644
--- a/imports/client.tsx
+++ b/imports/client.tsx
@@ -1086,6 +1086,7 @@ export function useDeepQuery
{
const sq = serializeQuery(query);
@@ -1125,6 +1126,7 @@ export function useDeepSubscription {
const [miniName] = useState(options?.mini || Math.random().toString(36).slice(2, 7));
+ debug('useDeepSubscription', miniName, query, options);
const deep = useDeep();
const wq = useMemo(() => {
const sq = serializeQuery(query);
@@ -1158,4 +1160,9 @@ export interface UseDeepSubscriptionResult> {
data?: LL[];
error?: any;
loading: boolean;
+}
+
+export function useDeepId(start: DeepClientStartItem | QueryLink, ...path: DeepClientPathItem[]): { data: number; loading: boolean; error?: any } {
+ const result = useDeepQuery({ id: { _id: [start, ...path] } });
+ return { data: result?.data?.[0]?.id, loading: result?.loading, error: result?.error };
}
\ No newline at end of file
diff --git a/package.json b/package.json
index 7303630d..725fbfcf 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/deeplinks",
- "version": "0.0.196",
+ "version": "0.0.197",
"license": "Unlicense",
"type": "module",
"scripts": {