Create two Things in a SolidDataset with @inrupt/solid-client

I know how to create a Thing in a Dataset with @inrupt/solid-client, but i would like to create Another thing in the same dataset.
i havent found any add Thing

example :

ThingA type TypeA
ThingA uses ThingB
ThingB type TypeB
ThingB uses ThingC

perharps another for @zwifi ?

What have you tried so far? Feels like this should just work:

let dataset = createSolidDataset();

let thingB = createThing({ name: "ThingB" });
thingB = addUrl(thingB, rdf.type, "");

let thingA = createThing({ name: "thingA" });
thingA = addUrl(thingA, rdf.type, "");
thingA = addUrl(thingA, "", thingB);

dataset = setThing(dataset, thingA);
dataset = setThing(dataset, thingB);

(Edit: fixed ;.)


Thxs, it folks :wink:

just a typo with : instead of

1 Like