Define query API for `Unit`
Time to start thinking about specs for retrieving and managing Unit
records and the OM ontology. See https://github.com/h-REA/hREA/pull/387#issuecomment-1426941156 for more.
-
Extend Unit
records with an optionalsameAs
field (corresponding to http://owl.semanticweb.org/page/Owl:sameAs.html). This would allow the GraphQL API to reference not only OM units, but units from other vocabs as well. -
Add filter
parameters to theunits()
query API so thatsameAs: [URI!]
can be used to select sub-sets of well-known units.
Other questions:
- Is
owl:sameAs
the correct relationship to be modeling, or is this more of anrdfs:subClassOf
situation? I figure reasoning logic that makes any comparisons is going to have to recursively fetch and compare all references either way (eg. anhour
in the coffee shop's network issameAs
anhour
in the bakery's network which issameAs
the OM2.0 'hour' term). - Is one relationship (
sameAs: URI
) sufficient, or would we prefer multiple (classifiedAs: [URI!]
)? - Should
sameAs
return a self-referential URI to its ownUnit
record if no value is assigned? Should this be queryable for custom units?