Skip to content

Commit

Permalink
fix(groups): fix user, search, and preview group membership to be fet…
Browse files Browse the repository at this point in the history
…ched for both external and native group memberships (#5587)
  • Loading branch information
Aditya Radhakrishnan authored Aug 8, 2022
1 parent e4a587a commit aabc554
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
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

0 comments on commit aabc554

Please sign in to comment.