Skip to content

resolve does not work with ":" syntaxes #40

Description

@matthieu-fesselier

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

Activity

  1. RubenVerborgh commented on Sep 25, 2019

    @RubenVerborgh
    Member

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

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

  2. matthieu-fesselier commented on Sep 25, 2019

    @matthieu-fesselier
    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 :)

  3. RubenVerborgh commented on Sep 25, 2019

    @RubenVerborgh
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions