Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve does not work with ":" syntaxes #40

Open
matthieu-fesselier opened this issue Sep 25, 2019 · 3 comments
Open

resolve does not work with ":" syntaxes #40

matthieu-fesselier opened this issue Sep 25, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@matthieu-fesselier
Copy link

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
@RubenVerborgh RubenVerborgh added the bug Something isn't working label Sep 25, 2019
@RubenVerborgh
Copy link
Member

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

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

@matthieu-fesselier
Copy link
Author

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

@RubenVerborgh
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants