catalog-graph: remove explicit maxDepth query param

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-02 14:25:53 +01:00
parent 9311ee4268
commit 99f05cbc70
3 changed files with 7 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-graph': patch
---
The link from the `CatalogGraphCard` to the `CatalogGraphPage` no longer includes an explicit `maxDepth` parameter, letting the `CatalogGraphPage` choose the initial `maxDepth` instead.
@@ -133,7 +133,7 @@ describe('<CatalogGraphCard/>', () => {
expect(button).toBeInTheDocument();
expect(button.closest('a')).toHaveAttribute(
'href',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=2&unidirectional=true&mergeRelations=true&direction=LR',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=true&direction=LR',
);
});
@@ -157,7 +157,7 @@ describe('<CatalogGraphCard/>', () => {
expect(button).toBeInTheDocument();
expect(button.closest('a')).toHaveAttribute(
'href',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=3&unidirectional=true&mergeRelations=false&direction=LR',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=false&direction=LR',
);
});
@@ -111,7 +111,6 @@ export const CatalogGraphCard = (props: {
const catalogGraphParams = qs.stringify(
{
rootEntityRefs: [stringifyEntityRef(entity)],
maxDepth: maxDepth + 1,
unidirectional,
mergeRelations,
kinds,