Does anyone have a working example or link to some running demo code that shows how to successfully use removeThing from “@inrupt/solid-client”? I have tried:
let items_dataset = await getSolidDataset(items_URL, { fetch: solid_fetch })
const thing = createThing({ name: id }) // a thing with the same name/id was previous saved to that dataset.
items_dataset = removeThing(items_dataset, thing)
saveSolidDatasetAt(items_URL, items_dataset, { fetch: solid_fetch })
But it does not seem to delete that item from the dataset. I assume I need to call removeThing with a URL but how to I convert the name/id of a thing into a URL of that thing?
One thing that could also be of interest is the asUrl function, which takes in a Thing and optionally a base URL (if the Thing has only been created locally), and returns this Thing's URL.