LDflex / Query-Solid

Simple access to data in Solid pods through LDflex expressions
https://solid.github.io/query-ldflex/
MIT License
66 stars 15 forks source link

.properties should return compacted properties #39

Open matthieu-fesselier opened 5 years ago

matthieu-fesselier commented 5 years ago

When using the function properties on a resource or a container, I get a list of expanded properties (example)

Shouldn't it be compacted? It seems like LDFlex is doing it, and we already have the predicates function which returns expanded properties (example)

RubenVerborgh commented 5 years ago

Indeed; this depended on https://github.com/rubensworks/jsonld-context-parser.js/issues/21, which now seems to be done. Upgrading the JSON-LD context parser should do the trick.

jblemee commented 5 years ago

Don't you think that somewhere in query-ldflex code the parsedContext setting is missing ?

For instance, with LDFlex, this code returns compacted properties :

 const pathProxy = new PathProxy({ handlers });
    person = pathProxy.createPath({
      queryEngine,
      parsedContext: new ContextParser().parse(context),
    }, { subject });

and this code does not :

 const pathProxy = new PathProxy({ handlers });
    person = pathProxy.createPath({
      queryEngine
    }, { subject });
RubenVerborgh commented 5 years ago

Interesting; will need to have a look.