-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui) Build entity doesn't exist page for entity profiles #7150
feat(ui) Build entity doesn't exist page for entity profiles #7150
Conversation
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java
Outdated
Show resolved
Hide resolved
...hql-core/src/main/java/com/linkedin/datahub/graphql/types/dataset/mappers/DatasetMapper.java
Outdated
Show resolved
Hide resolved
...hql-core/src/main/java/com/linkedin/datahub/graphql/types/dataset/mappers/DatasetMapper.java
Outdated
Show resolved
Hide resolved
@@ -49,6 +49,10 @@ export default function EmbeddedProfile<T>({ urn, entityType, getOverridePropert | |||
const { entityData, dataPossiblyCombinedWithSiblings, dataNotCombinedWithSiblings, loading, refetch } = | |||
useGetDataForProfile({ urn, entityType, useEntityQuery, getOverrideProperties }); | |||
|
|||
if (entityData?.exists === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you planning on adding this inside of EntityProfile component as part of this PR or separately?
Looks like FE build failing!
Shoot I just completely forgot to push up my last commit adding this to the regular profie! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really really nice, man!
In the embedded profile for the chrome extension as well as any entity profile, we want to show a page saying that an entity doesn't exist in datahub if that's the case instead of pretending like we know about the entity and showing a bare bones page (like we do in the main app).
This adds a new
exists
field on entities that you can query in graphql. It reuses an existingEntityExistsResolver
that was meant as its own endpoint with aurn
in the params, but I repurpose it to get the urn from the source entity if it's not in the params so it can be used for both purposes.Here's what the page looks like for embedded profiles:
and for regular profiles:
Checklist