Query-Solid
Query-Solid copied to clipboard
resolve does not work with ":" syntaxes
Is it expected that, with this:
await solid.data.context.extend(base_context)
const resource = solid.data['https://api.coopstarter.happy-dev.fr/resources/1/']
This works:
console.log((await resource['rdf:type']).toString()); // "coopstarter:resource"
console.log((await resource.resolve('["rdf:type"]')).toString()); // "coopstarter:resource"
console.log((await resource.resolve('rdf_type')).toString()); // "coopstarter:resource"
But this does not:
console.log((await resource.resolve('rdf:type')).toString()); // Error
Mmm, resolve
is supposed to only work from the root.
BTW Thanks for filing all of these bugs; they will be investigated.
What you mean is this is supposed to work:
solid.data.resolve('user.bestfriend.name')
But not this?
solid.data.user.resolve('bestfriend.name')
We built our wrapper around this idea:
const resource = solid.data['someURI']
const value = resource.resolve(path)
And except for the :
syntax, it works fine so far :)
I thought I had only programmed the first, but would indeed be nice to have both 😀