From 66c4d4a59712794a085734fe1ef711c60cdecedc Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Tue, 4 Jun 2024 09:43:12 +0200 Subject: [PATCH] fix: return type --- apis/shared-dimensions/lib/handlers/collection.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/shared-dimensions/lib/handlers/collection.ts b/apis/shared-dimensions/lib/handlers/collection.ts index 7a66911c0..f729e2941 100644 --- a/apis/shared-dimensions/lib/handlers/collection.ts +++ b/apis/shared-dimensions/lib/handlers/collection.ts @@ -1,6 +1,6 @@ import type { NamedNode, Quad } from '@rdfjs/types' import $rdf from 'rdf-ext' -import clownface from 'clownface' +import clownface, { GraphPointer } from 'clownface' import { hydra, rdf } from '@tpluscode/rdf-ns-builders' interface CollectionHandler { @@ -11,7 +11,7 @@ interface CollectionHandler { collection: NamedNode } -export function getCollection({ collection, view, memberQuads, memberType, collectionType }: CollectionHandler) { +export function getCollection({ collection, view, memberQuads, memberType, collectionType }: CollectionHandler): GraphPointer { const dataset = $rdf.dataset(memberQuads) const graph = clownface({ dataset }) @@ -28,5 +28,5 @@ export function getCollection({ collection, view, memberQuads, memberType, colle .addIn(hydra.view, collection) } - return graph + return graph.node(collection) }