From 620eeb18e3e3b82486f9751f610a144c5e8ef012 Mon Sep 17 00:00:00 2001 From: Martijn Date: Fri, 19 Jul 2024 11:51:54 +0200 Subject: [PATCH] fix(core): Return type of collection breadcrumb was missing slug (#2960) --- .../core/src/api/resolvers/entity/collection-entity.resolver.ts | 2 +- packages/core/src/service/services/collection.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts b/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts index 59c7947935..9d7383d66c 100644 --- a/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts +++ b/packages/core/src/api/resolvers/entity/collection-entity.resolver.ts @@ -78,7 +78,7 @@ export class CollectionEntityResolver { @Ctx() ctx: RequestContext, @Parent() collection: Collection, ): Promise { - return this.collectionService.getBreadcrumbs(ctx, collection) as any; + return this.collectionService.getBreadcrumbs(ctx, collection); } @ResolveField() diff --git a/packages/core/src/service/services/collection.service.ts b/packages/core/src/service/services/collection.service.ts index 636dc78fc8..09216cf998 100644 --- a/packages/core/src/service/services/collection.service.ts +++ b/packages/core/src/service/services/collection.service.ts @@ -292,7 +292,7 @@ export class CollectionService implements OnModuleInit { async getBreadcrumbs( ctx: RequestContext, collection: Collection, - ): Promise> { + ): Promise> { const rootCollection = await this.getRootCollection(ctx); if (idsAreEqual(collection.id, rootCollection.id)) { return [pick(rootCollection, ['id', 'name', 'slug'])];