Improve doc
This commit is contained in:
+2
-3
@@ -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
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user