Improve doc

This commit is contained in:
srosset81
2026-08-07 16:48:24 +02:00
parent 7a4b15f894
commit 6ac2995b99
4 changed files with 14 additions and 21 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
export { default as authProvider } from "./auth-provider";
export * from "./auth-provider";
export { default as dataProvider } from "./data-provider";
export { default as liveProvider } from "./live-provider";
export { default as authProvider } from "./auth-provider";
export * from "./auth-provider";
export * from "./types";
export * from "./utils";
+3 -1
View File
@@ -1,8 +1,9 @@
import { BaseKey } from "@refinedev/core";
import { RdfOrmSubscription } from "@ng-org/orm";
import type { ShapeType } from "@ng-org/shex-orm";
import { ShapeType } from "@ng-org/shex-orm";
import { DeepSignalSet, DeepPatch } from "@ng-org/alien-deepsignals"
// Helper function to retrieve the signal object and eventually close the subscription
export const getSignalObject = async (shapeType: ShapeType<any>, ids?: string[], closeSubscription: boolean = true) : Promise<DeepSignalSet<any>> => {
const subscription = RdfOrmSubscription.getOrCreate(shapeType, { graphs: ids || [''] });
await subscription.readyPromise;
@@ -16,6 +17,7 @@ export const isGraphKey = (key: BaseKey): boolean => {
return key !== null && typeof key === "string" && key.includes(":v:");
}
// Add the mandatory `id` property to the object, based on the `@graph` property.
export const addIdToObject = (obj: any) => {
if (!obj["@graph"]) {
throw new Error("Object is missing @graph property");