diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts index caf6c8c501..1ce32fc523 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/types.ts @@ -15,6 +15,7 @@ */ import { DependencyGraphTypes } from '@backstage/core-components'; +import { JsonObject } from '@backstage/types'; import { MouseEventHandler } from 'react'; /** @@ -63,6 +64,10 @@ export type EntityNodeData = { * Namespace of the entity. */ namespace: string; + /** + * Optional spec of the entity. + */ + spec?: JsonObject; /** * Whether the entity is focused, optional, defaults to false. Focused * entities are highlighted in the graph. diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts index a1c3416d4f..2e177e2b75 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts @@ -75,6 +75,7 @@ export function useEntityRelationNodesAndEdges({ kind: entity.kind, name: entity.metadata.name, namespace: entity.metadata.namespace ?? DEFAULT_NAMESPACE, + spec: entity.spec ?? undefined, focused, color: focused ? 'secondary' : 'primary', };