Add getEntityAncestors to CatalogClientWrapper

Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com>
Co-authored-by: Ben Lambert <ben@blam.sh>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-10-01 13:05:32 +02:00
parent 3cf068a4b1
commit a0c6ae89b1
@@ -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<CatalogEntityAncestorsResponse> {
return await this.client.getEntityAncestors(request, {
token: options?.token ?? (await this.identityApi.getIdToken()),
});
}
}