cubiql icon indicating copy to clipboard operation
cubiql copied to clipboard

2nd(+) order properties of dimension values

Open ricroberts opened this issue 7 years ago • 4 comments

For some dimension values, like areas, organisations and times, its useful to return (or order by, or filter) information about the resources other than just their URI (or enum)

For example, for the refPeriod dimension, the values are often data.gov.uk time intervals. And it's often useful to order by (for example) the end time of the interval, and provide the end times to the client (along with the URI and/or label for the period).

Likewise for refArea, with PMD the values are areas, but we may want to group areas by their collection. And we may want to return the area code, and collection along with the label or URI.

If we want to group, order or filter results by these 2nd order properties, then we need to support then in the graphQL endpoint.

Q: Or... can we get away with just returning the URIs, and requiring that a client looks up the other info themselves (by SPARQL or whatever)...

See also #17.

ricroberts avatar Oct 09 '17 13:10 ricroberts

Q: Or... can we get away with just returning the URIs, and requiring that a client looks up the other info themselves (by SPARQL or whatever)...

This seems to defeat the objective here. Obviously that's one reason we provide the URI, but if this is a common usecase we should probably provide what's needed.

RickMoynihan avatar Oct 09 '17 14:10 RickMoynihan

See also #12 and #13

ricroberts avatar Oct 09 '17 14:10 ricroberts

Maybe we need to augment the data about the dimension values in the db with extra graphql predicates (either materialised or with reasoning), so that we can consistently query the dim values the graphql resolvers...

ricroberts avatar Oct 12 '17 10:10 ricroberts

See issues #71 and #72 for concrete cases where need to support this (refArea/refPeriod).

RickMoynihan avatar Dec 07 '17 15:12 RickMoynihan