diff --git a/CHANGELOG.md b/CHANGELOG.md index 6907c96e5e..aa91380a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ You can also check the [release page](https://github.com/visualize-admin/visuali - Maintenance - Added retrieval of dimension units via `qudt:hasUnit` (but kept `qudt:unit` for backward compatibility) - Improved GQL debug panel (added resolver variables and rectangles to visually indicate resolving times) + - Removed depreciated `validThrough` cube filters # [3.23.0] - 2023-10-17 diff --git a/app/rdf/cube-filters.ts b/app/rdf/cube-filters.ts index 4f0bafe08c..8475c426c3 100644 --- a/app/rdf/cube-filters.ts +++ b/app/rdf/cube-filters.ts @@ -51,7 +51,6 @@ export const makeCubeFilters = ({ const res = [ // Cubes that have a newer version published have a schema.org/expires property; Only show cubes that don't have it - Cube.filter.noValidThrough(), // Keep noValidThrough for backwards compat Cube.filter.noExpires(), isVisualizeCubeFilter, includeDrafts diff --git a/app/rdf/query-utils.ts b/app/rdf/query-utils.ts index f79b62b587..f5a08e378c 100644 --- a/app/rdf/query-utils.ts +++ b/app/rdf/query-utils.ts @@ -6,19 +6,18 @@ export const makeVisualizeDatasetFilter = (options?: { includeDrafts?: boolean; cubeIriVar?: string; }) => { - const cubeIriVar = options?.cubeIriVar || "?iri"; - const includeDrafts = options?.includeDrafts || false; + const cubeIriVar = options?.cubeIriVar ?? "?iri"; + const includeDrafts = options?.includeDrafts ?? false; + return sparql` ${cubeIriVar} ${ schema.workExample - } . + } . ${ includeDrafts ? "" - : sparql`${cubeIriVar} ${schema.creativeWorkStatus} .` + : sparql`${cubeIriVar} ${schema.creativeWorkStatus} .` } - ${cubeIriVar} ${cube.observationConstraint} ?shape. - FILTER NOT EXISTS {${cubeIriVar} ${schema.expires} ?expiryDate } - FILTER NOT EXISTS {${cubeIriVar} ${schema.validThrough} ?validThrough } - `; + ${cubeIriVar} ${cube.observationConstraint} ?shape . + FILTER NOT EXISTS { ${cubeIriVar} ${schema.expires} ?expiryDate }`; };