From a0c6ae89b19e20f9ca7617764e3b5d3c927a669e Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 1 Oct 2021 13:05:32 +0200 Subject: [PATCH] Add getEntityAncestors to CatalogClientWrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Ben Lambert Co-authored-by: Patrik Oldsberg Signed-off-by: Johan Haals --- plugins/catalog/src/CatalogClientWrapper.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/catalog/src/CatalogClientWrapper.ts b/plugins/catalog/src/CatalogClientWrapper.ts index 46ca8ec0f9..0463cbf30e 100644 --- a/plugins/catalog/src/CatalogClientWrapper.ts +++ b/plugins/catalog/src/CatalogClientWrapper.ts @@ -23,6 +23,8 @@ import { CatalogEntitiesRequest, CatalogListResponse, CatalogRequestOptions, + CatalogEntityAncestorsRequest, + CatalogEntityAncestorsResponse, } from '@backstage/catalog-client'; import { IdentityApi } from '@backstage/core-plugin-api'; @@ -118,4 +120,13 @@ export class CatalogClientWrapper implements CatalogApi { token: options?.token ?? (await this.identityApi.getIdToken()), }); } + + async getEntityAncestors( + request: CatalogEntityAncestorsRequest, + options?: CatalogRequestOptions, + ): Promise { + return await this.client.getEntityAncestors(request, { + token: options?.token ?? (await this.identityApi.getIdToken()), + }); + } }