diff --git a/packages/react/src/methods/useLinkQuery.ts b/packages/react/src/methods/useLinkQuery.ts new file mode 100644 index 0000000..fa92ee1 --- /dev/null +++ b/packages/react/src/methods/useLinkQuery.ts @@ -0,0 +1,27 @@ +import type { ConnectedLdoDataset, ConnectedPlugin } from "@ldo/connected"; +import type { LdoBase } from "@ldo/ldo"; +import type { SubjectNode } from "@ldo/rdf-utils"; +import type { LQInput } from "packages/connected/dist/types/ILinkQuery"; + +/** + * @internal + * + * Creates a useMatchSubject function. + */ +export function createUseQueryLink( + dataset: ConnectedLdoDataset, +) { + /** + * Returns an array of matching linked data objects. Triggers a rerender if + * the data is updated. + */ + return function useQueryLink< + Type extends LdoBase, + QueryInput extends LQInput, + >( + shapeType: ShapeType, + startingResource: string, + startingSubject: SubjectNode | string, + linkQuery: QueryInput, + ): ExpandDeep> | undefined {}; +}