Closed ptsefton closed 4 years ago
Add convenience methods for following the graph without having to do this:
if (item["militaryService"] && item["militaryService"]["@id"]) { const mil = crate.getItem(item["militaryService"]["@id"]); }
eg:
const mil = item.resolve({"property": "miltaryService"});
And also:
const militaryServiceName = item.resolve({"property": "miltaryService"}, ({"property": "name"});
AND a version with constraints:
const militaryServiceName = item.resolve([({"property": "@reverse"}, ({"property": "object", "includes": {"@type", "Action"}}]);
Which would follow @reverse properties, and find Items of @type Action that have an objectproperty that refers to item.
@type
Action
object
item
Add convenience methods for following the graph without having to do this:
eg:
And also:
AND a version with constraints:
Which would follow @reverse properties, and find Items of
@type
Action
that have anobject
property that refers toitem
.