Query-Solid icon indicating copy to clipboard operation
Query-Solid copied to clipboard

resolve does not work with ":" syntaxes

Open matthieu-fesselier opened this issue 5 years ago • 3 comments

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

matthieu-fesselier avatar Sep 25 '19 08:09 matthieu-fesselier

Mmm, resolve is supposed to only work from the root.

BTW Thanks for filing all of these bugs; they will be investigated.

RubenVerborgh avatar Sep 25 '19 09:09 RubenVerborgh

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 :)

matthieu-fesselier avatar Sep 25 '19 09:09 matthieu-fesselier

I thought I had only programmed the first, but would indeed be nice to have both 😀

RubenVerborgh avatar Sep 25 '19 09:09 RubenVerborgh