feat!: useShapeQuery lit par la requete de forme du SDK
This commit is contained in:
@@ -32,7 +32,7 @@ import {
|
||||
configure,
|
||||
} from "@ng-eventually/polyfill";
|
||||
|
||||
configure({ ng: realNg, useShape: realUseShape, getSession, sharedWallet });
|
||||
configure({ ng: realNg, useShape: realUseShape, ormSubscription, initNg, sharedWallet });
|
||||
await ensureIdentity(); // who I am (returned), connection work awaited
|
||||
// A store is named by its reference — `doc_create` takes one, and the session is where
|
||||
// upstream gets it. Omit it and the document goes to the private store, as upstream does.
|
||||
@@ -41,6 +41,9 @@ await docs.sparqlUpdate(sid, `INSERT DATA { … }`, doc);
|
||||
// Reading is by SHAPE, over the SDK's own scope. `did:ng:i` is the whole local dataset;
|
||||
// naming documents in `graphs` reads exactly those. There is no "list my documents" call
|
||||
// and no way to scope a read by store — neither exists upstream.
|
||||
// It reads through the SDK's own shape query (`RdfOrmSubscription.getOrCreate`, passed to
|
||||
// `configure` as `ormSubscription`), and hands back the shape's own objects: `@graph`,
|
||||
// `@id` and one field per predicate the shape DECLARES.
|
||||
const query = useShapeQuery(NoteShape, { graphs: "did:ng:i" });
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user