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

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, "https://example.com/TypeB");

let thingA = createThing({ name: "thingA" });
thingA = addUrl(thingA, rdf.type, "https://example.com/TypeA");
thingA = addUrl(thingA, "https://example.com/uses", thingB);

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

(Edit: fixed ;.)

2 Likes