Fix API error in catalog graph plugin
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-graph': patch
|
||||
---
|
||||
|
||||
Add missing API implementation for catalog graph plugin in NFS apps.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createFrontendPlugin,
|
||||
PageBlueprint,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
@@ -24,7 +25,11 @@ import {
|
||||
} from '@backstage/core-compat-api';
|
||||
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { catalogGraphRouteRef, catalogEntityRouteRef } from './routes';
|
||||
import { Direction } from '@backstage/plugin-catalog-graph';
|
||||
import {
|
||||
catalogGraphApiRef,
|
||||
DefaultCatalogGraphApi,
|
||||
Direction,
|
||||
} from '@backstage/plugin-catalog-graph';
|
||||
|
||||
const CatalogGraphEntityCard = EntityCardBlueprint.makeWithOverrides({
|
||||
name: 'relations',
|
||||
@@ -85,6 +90,15 @@ const CatalogGraphPage = PageBlueprint.makeWithOverrides({
|
||||
},
|
||||
});
|
||||
|
||||
const CatalogGraphApi = ApiBlueprint.make({
|
||||
params: defineParams =>
|
||||
defineParams({
|
||||
api: catalogGraphApiRef,
|
||||
deps: {},
|
||||
factory: () => new DefaultCatalogGraphApi(),
|
||||
}),
|
||||
});
|
||||
|
||||
export default createFrontendPlugin({
|
||||
pluginId: 'catalog-graph',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
@@ -94,7 +108,7 @@ export default createFrontendPlugin({
|
||||
externalRoutes: {
|
||||
catalogEntity: convertLegacyRouteRef(catalogEntityRouteRef),
|
||||
},
|
||||
extensions: [CatalogGraphPage, CatalogGraphEntityCard],
|
||||
extensions: [CatalogGraphPage, CatalogGraphEntityCard, CatalogGraphApi],
|
||||
});
|
||||
|
||||
export { catalogGraphTranslationRef } from './translation';
|
||||
|
||||
Reference in New Issue
Block a user