Skip to content
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

fix(groups): fix user, search, and preview group membership to be fetched for both external and native group memberships #5587

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion datahub-web-react/src/graphql/preview.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ fragment entityPreview on Entity {
displayName
description
}
memberCount: relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING, start: 0, count: 1 }) {
memberCount: relationships(
input: { types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"], direction: INCOMING, start: 0, count: 1 }
) {
total
}
}
Expand Down
4 changes: 3 additions & 1 deletion datahub-web-react/src/graphql/search.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ fragment searchResultFields on Entity {
displayName
description
}
memberCount: relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING, start: 0, count: 1 }) {
memberCount: relationships(
input: { types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"], direction: INCOMING, start: 0, count: 1 }
) {
total
}
}
Expand Down
24 changes: 20 additions & 4 deletions datahub-web-react/src/graphql/user.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ query getUser($urn: String!, $groupsCount: Int!) {
globalTags {
...globalTagsFields
}
relationships(input: { types: ["IsMemberOfGroup"], direction: OUTGOING, start: 0, count: $groupsCount }) {
relationships(
input: {
types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"]
direction: OUTGOING
start: 0
count: $groupsCount
}
) {
start
count
total
Expand All @@ -42,7 +49,9 @@ query getUser($urn: String!, $groupsCount: Int!) {
description
email
}
relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING }) {
relationships(
input: { types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"], direction: INCOMING }
) {
start
count
total
Expand All @@ -56,7 +65,14 @@ query getUser($urn: String!, $groupsCount: Int!) {

query getUserGroups($urn: String!, $start: Int!, $count: Int!) {
corpUser(urn: $urn) {
relationships(input: { types: ["IsMemberOfGroup"], direction: OUTGOING, start: $start, count: $count }) {
relationships(
input: {
types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"]
direction: OUTGOING
start: $start
count: $count
}
) {
start
count
total
Expand All @@ -72,7 +88,7 @@ query getUserGroups($urn: String!, $start: Int!, $count: Int!) {
email
}
}
relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING }) {
relationships(input: { types: ["IsMemberOfGroup", "IsMemberOfNativeGroup"], direction: INCOMING }) {
start
count
total
Expand Down