The <corpGroupInfo> is deprecated in entity.graphq...
# troubleshoot
r
The corpGroupInfo is deprecated in entity.graphql. In the comment, it recommends using
properties
however, the frontend code(group.graphql) does not request
properties
field. Is this some bug?
I emitted
corpGroupInfo
aspect which including email info. But it does not render on UI
after doing the following change, it get fixed
Copy code
diff --git a/datahub-web-react/src/app/entity/group/GroupProfile.tsx b/datahub-web-react/src/app/entity/group/GroupProfile.tsx
index 0c4eb37a6..c508f07cc 100644
--- a/datahub-web-react/src/app/entity/group/GroupProfile.tsx
+++ b/datahub-web-react/src/app/entity/group/GroupProfile.tsx
@@ -91,7 +91,7 @@ export default function GroupProfile() {
         photoUrl: undefined,
         avatarName: data?.corpGroup?.info?.displayName || data?.corpGroup?.name,
         name: data?.corpGroup?.info?.displayName || data?.corpGroup?.name || undefined,
-        email: data?.corpGroup?.editableProperties?.email || undefined,
+        email: data?.corpGroup?.editableProperties?.email || data?.corpGroup?.properties?.email || undefined,
         slack: data?.corpGroup?.editableProperties?.slack || undefined,
         aboutText: data?.corpGroup?.editableProperties?.description || undefined,
         groupMemberRelationships: groupMemberRelationships as EntityRelationshipsResult,
diff --git a/datahub-web-react/src/graphql/group.graphql b/datahub-web-react/src/graphql/group.graphql
index 441d5187e..77245f2b2 100644
--- a/datahub-web-react/src/graphql/group.graphql
+++ b/datahub-web-react/src/graphql/group.graphql
@@ -8,6 +8,9 @@ query getGroup($urn: String!, $membersCount: Int!) {
             description
             email
         }
+        properties {
+            email
+        }
         editableProperties {
             description
             slack
o
Hi! Yep looks like this one has not gotten moved over to using Properties instead of Info yet. The profiles have been getting a makeover on the Typescript side gradually. It's strange the
CorpGroupInfo
aspect would not show up though, that should be working. I would also think that you would need to make some backend changes for this to work with the
CorpGroupProperties
aspect. Are you sure you were not hitting a cached result from the GraphQL? If you take this change back out and restart the server, does it still show up?
r
I am not familiar with react at all, but from the original code, it looks like the it only fetches email info from
editableProperties
Copy code
email: data?.corpGroup?.editableProperties?.email || undefined,
o
Ah yeah sorry, was hard to read the diff on Slack and missed that email specifically was missing the extra check on info/properties. If you want to put this up as a PR we can get it merged in 🙂
r
sure. My teammate or I will open a PR today 🙂
🙌 1
some update about the PR: the PR is merger. More info here: https://datahubspace.slack.com/archives/C017W0NTZHR/p1648074640723099
thankyou 1