diff --git a/datahub-web-react/src/app/glossary/GlossaryBrowser/GlossaryBrowser.tsx b/datahub-web-react/src/app/glossary/GlossaryBrowser/GlossaryBrowser.tsx index d5303061e5f8db..f25bb796f98dd6 100644 --- a/datahub-web-react/src/app/glossary/GlossaryBrowser/GlossaryBrowser.tsx +++ b/datahub-web-react/src/app/glossary/GlossaryBrowser/GlossaryBrowser.tsx @@ -1,7 +1,8 @@ import React, { useEffect } from 'react'; import styled from 'styled-components/macro'; import { useGetRootGlossaryNodesQuery, useGetRootGlossaryTermsQuery } from '../../../graphql/glossary.generated'; -import { GlossaryNode, GlossaryTerm } from '../../../types.generated'; +import { ChildGlossaryTermFragment } from '../../../graphql/glossaryNode.generated'; +import { GlossaryNode } from '../../../types.generated'; import { sortGlossaryNodes } from '../../entity/glossaryNode/utils'; import { sortGlossaryTerms } from '../../entity/glossaryTerm/utils'; import { useEntityRegistry } from '../../useEntityRegistry'; @@ -18,7 +19,7 @@ const BrowserWrapper = styled.div` interface Props { rootNodes?: GlossaryNode[]; - rootTerms?: GlossaryTerm[]; + rootTerms?: ChildGlossaryTermFragment[]; isSelecting?: boolean; hideTerms?: boolean; openToEntity?: boolean; diff --git a/datahub-web-react/src/app/glossary/GlossaryBrowser/TermItem.tsx b/datahub-web-react/src/app/glossary/GlossaryBrowser/TermItem.tsx index 0915b3a7ca9aea..6386020ad8396d 100644 --- a/datahub-web-react/src/app/glossary/GlossaryBrowser/TermItem.tsx +++ b/datahub-web-react/src/app/glossary/GlossaryBrowser/TermItem.tsx @@ -2,9 +2,9 @@ import React from 'react'; import styled from 'styled-components/macro'; import { Link } from 'react-router-dom'; import { useEntityData } from '../../entity/shared/EntityContext'; -import { GlossaryTerm } from '../../../types.generated'; import { useEntityRegistry } from '../../useEntityRegistry'; import { ANTD_GRAY } from '../../entity/shared/constants'; +import { ChildGlossaryTermFragment } from '../../../graphql/glossaryNode.generated'; const TermWrapper = styled.div` font-weight: normal; @@ -44,7 +44,7 @@ export const NameWrapper = styled.span<{ showSelectStyles?: boolean }>` `; interface Props { - term: GlossaryTerm; + term: ChildGlossaryTermFragment; isSelecting?: boolean; selectTerm?: (urn: string, displayName: string) => void; } diff --git a/datahub-web-react/src/app/glossary/GlossaryEntitiesList.tsx b/datahub-web-react/src/app/glossary/GlossaryEntitiesList.tsx index dc606d525e79cc..ed1744d800eebf 100644 --- a/datahub-web-react/src/app/glossary/GlossaryEntitiesList.tsx +++ b/datahub-web-react/src/app/glossary/GlossaryEntitiesList.tsx @@ -1,6 +1,7 @@ import React from 'react'; import styled from 'styled-components/macro'; import { GlossaryNodeFragment } from '../../graphql/fragments.generated'; +import { ChildGlossaryTermFragment } from '../../graphql/glossaryNode.generated'; import { GlossaryNode, GlossaryTerm } from '../../types.generated'; import { useEntityRegistry } from '../useEntityRegistry'; import GlossaryEntityItem from './GlossaryEntityItem'; @@ -13,7 +14,7 @@ const EntitiesWrapper = styled.div` interface Props { nodes: (GlossaryNode | GlossaryNodeFragment)[]; - terms: GlossaryTerm[]; + terms: (GlossaryTerm | ChildGlossaryTermFragment)[]; } function GlossaryEntitiesList(props: Props) { diff --git a/datahub-web-react/src/graphql/glossary.graphql b/datahub-web-react/src/graphql/glossary.graphql index d0f8cc7bb686a4..27f26b88082de4 100644 --- a/datahub-web-react/src/graphql/glossary.graphql +++ b/datahub-web-react/src/graphql/glossary.graphql @@ -4,7 +4,7 @@ query getRootGlossaryTerms { start total terms { - ...glossaryTerm + ...childGlossaryTerm } } } diff --git a/datahub-web-react/src/graphql/glossaryNode.graphql b/datahub-web-react/src/graphql/glossaryNode.graphql index b0d4d8fc7f3c79..a6263ee4eba2b6 100644 --- a/datahub-web-react/src/graphql/glossaryNode.graphql +++ b/datahub-web-react/src/graphql/glossaryNode.graphql @@ -1,4 +1,6 @@ fragment childGlossaryTerm on GlossaryTerm { + urn + type name hierarchicalName properties {