diff --git a/.changeset/smooth-planes-mate.md b/.changeset/smooth-planes-mate.md new file mode 100644 index 0000000000..7d2eb897de --- /dev/null +++ b/.changeset/smooth-planes-mate.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Filter fetched entity fields to optimize loading techdocs list diff --git a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx index 9b106c94ce..90b968de6c 100644 --- a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx +++ b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx @@ -124,7 +124,9 @@ export const TechDocsCustomHome = ({ const configApi: ConfigApi = useApi(configApiRef); const { value: entities, loading, error } = useAsync(async () => { - const response = await catalogApi.getEntities(); + const response = await catalogApi.getEntities({ + fields: ['apiVersion', 'kind', 'metadata', 'spec.owner', 'spec.type'], + }); return response.items.filter((entity: Entity) => { return !!entity.metadata.annotations?.['backstage.io/techdocs-ref']; });