diff --git a/apps/crn-server/src/data-providers/contentful/analytics.data-provider.ts b/apps/crn-server/src/data-providers/contentful/analytics.data-provider.ts index 3cfe0ba63b..683fa3e954 100644 --- a/apps/crn-server/src/data-providers/contentful/analytics.data-provider.ts +++ b/apps/crn-server/src/data-providers/contentful/analytics.data-provider.ts @@ -40,7 +40,17 @@ export class AnalyticsContentfulDataProvider implements AnalyticsDataProvider { ), interestGroupMemberCount: (!team.inactiveSince && - team.linkedFrom?.interestGroupsCollection?.total) || + getUniqueIdCount([ + ...(team.linkedFrom?.teamMembershipCollection?.items.flatMap( + (item) => + item?.linkedFrom?.usersCollection?.items + .filter(filterOutAlumni) + .flatMap(flattenInterestGroupLeaders), + ) || []), + ...(team.linkedFrom?.interestGroupsCollection?.items.flatMap( + (interestGroup) => interestGroup?.sys.id, + ) || []), + ])) || 0, interestGroupPreviousLeadershipRoleCount: getUniqueIdCount( team.linkedFrom?.teamMembershipCollection?.items.flatMap( @@ -52,7 +62,17 @@ export class AnalyticsContentfulDataProvider implements AnalyticsDataProvider { ), interestGroupPreviousMemberCount: (team.inactiveSince && - team.linkedFrom?.interestGroupsCollection?.total) || + getUniqueIdCount([ + ...(team.linkedFrom?.teamMembershipCollection?.items.flatMap( + (item) => + item?.linkedFrom?.usersCollection?.items + .filter(filterOutAlumni) + .flatMap(flattenInterestGroupLeaders), + ) || []), + ...(team.linkedFrom?.interestGroupsCollection?.items.flatMap( + (interestGroup) => interestGroup?.sys.id, + ) || []), + ])) || 0, workingGroupLeadershipRoleCount: getUniqueIdCount( team.linkedFrom?.teamMembershipCollection?.items.flatMap( diff --git a/apps/crn-server/test/data-providers/contentful/analytics.data-provider.test.ts b/apps/crn-server/test/data-providers/contentful/analytics.data-provider.test.ts index d944512953..7b4585844d 100644 --- a/apps/crn-server/test/data-providers/contentful/analytics.data-provider.test.ts +++ b/apps/crn-server/test/data-providers/contentful/analytics.data-provider.test.ts @@ -546,9 +546,27 @@ describe('Analytics Data Provider', () => { }); describe('Interest Group Member Count', () => { - test('Should return 0 for interestGroupMemberCount when the client returns interestGroupsCollection items as an empty array', async () => { + test('Should return 0 for interestGroupMemberCount when the client returns interestGroupsCollection and interestGroupLeadersCollection items as empty arrays', async () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 0; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items = + []; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + []; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupMemberCount).toBe(0); + }); + + test('Should return 0 for interestGroupMemberCount when the client returns teamMembershipCollection and interestGroupLeadersCollection items as null', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection = + null; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection = + null; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); @@ -560,7 +578,83 @@ describe('Analytics Data Provider', () => { test('Should return interestGroupMemberCount of 2 when the client returns a total of 2 interest groups associated with a team', async () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 2; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupMemberCount).toBe(2); + }); + + test('Should return interestGroupMemberCount of 3 when the client returns a total of 2 interest groups associated with a team and one leader of another interest group', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-3', + }, + }, + ]; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupMemberCount).toBe(3); + }); + + test('Should return interestGroupMemberCount of 2 when the client returns a total of 2 interest groups associated with a team and one leader of the same interest group', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-2', + }, + }, + ]; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); @@ -574,7 +668,19 @@ describe('Analytics Data Provider', () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = pastDate; - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 2; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); @@ -586,11 +692,31 @@ describe('Analytics Data Provider', () => { }); describe('Interest Group Previous Member Count', () => { - test('Should return 0 for interestGroupPreviousMemberCount when the client returns interestGroupsCollection items as an empty array and the team is inactive', async () => { + test('Should return 0 for interestGroupPreviousMemberCount when the client returns interestGroupsCollection and interestGroupLeadersCollection items as empty arrays and the team is inactive', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = + pastDate; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items = + []; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + []; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupPreviousMemberCount).toBe(0); + }); + + test('Should return 0 for interestGroupPreviousMemberCount when the client returns interestGroupsCollection and interestGroupLeadersCollection items as null and the team is inactive', async () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = pastDate; - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 0; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection = + null; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection = + null; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); @@ -604,7 +730,87 @@ describe('Analytics Data Provider', () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = pastDate; - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 2; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupPreviousMemberCount).toBe(2); + }); + + test('Should return interestGroupPreviousMemberCount of 3 when the client returns a total of 2 interest groups associated with the team and one leader of another interest group and the team is inactive', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = + pastDate; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-3', + }, + }, + ]; + contentfulGraphqlClientMock.request.mockResolvedValueOnce( + contentfulGraphQLResponse, + ); + + const result = await analyticsDataProvider.fetchTeamLeadership({}); + + expect(result.items[0]!.interestGroupPreviousMemberCount).toBe(3); + }); + + test('Should return interestGroupPreviousMemberCount of 2 when the client returns a total of 2 interest groups associated with the team and one leader of the same interest group and the team is inactive', async () => { + const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); + contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = + pastDate; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.teamMembershipCollection!.items[0]!.linkedFrom!.usersCollection!.items[0]!.linkedFrom!.interestGroupLeadersCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-2', + }, + }, + ]; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); @@ -618,7 +824,19 @@ describe('Analytics Data Provider', () => { const contentfulGraphQLResponse = getAnalyticsTeamLeadershipQuery(); contentfulGraphQLResponse.teamsCollection!.items[0]!.inactiveSince = null; - contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.total = 2; + contentfulGraphQLResponse.teamsCollection!.items[0]!.linkedFrom!.interestGroupsCollection!.items = + [ + { + sys: { + id: 'interest-group-1', + }, + }, + { + sys: { + id: 'interest-group-2', + }, + }, + ]; contentfulGraphqlClientMock.request.mockResolvedValueOnce( contentfulGraphQLResponse, ); diff --git a/apps/crn-server/test/fixtures/analytics.fixtures.ts b/apps/crn-server/test/fixtures/analytics.fixtures.ts index 0c49fc2135..a5069f2fae 100644 --- a/apps/crn-server/test/fixtures/analytics.fixtures.ts +++ b/apps/crn-server/test/fixtures/analytics.fixtures.ts @@ -51,7 +51,13 @@ export const getAnalyticsTeamLeadershipQuery = displayName: 'Team A', linkedFrom: { interestGroupsCollection: { - total: 1, + items: [ + { + sys: { + id: 'interest-group-1', + }, + }, + ], }, teamMembershipCollection: { items: [ diff --git a/packages/contentful/src/crn/autogenerated-gql/gql.ts b/packages/contentful/src/crn/autogenerated-gql/gql.ts index 9d20017c91..e304ea6ffd 100644 --- a/packages/contentful/src/crn/autogenerated-gql/gql.ts +++ b/packages/contentful/src/crn/autogenerated-gql/gql.ts @@ -13,7 +13,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Therefore it is highly recommended to use the babel-plugin for production. */ const documents = { - '\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n total\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': + '\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n }\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.FetchAnalyticsTeamLeadershipDocument, '\n fragment CalendarsContent on Calendars {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n googleCalendarId\n name\n color\n googleApiMetadata\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n complete\n }\n }\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n }\n }\n }\n }\n': types.CalendarsContentFragmentDoc, @@ -135,8 +135,8 @@ export function gql(source: string): unknown; * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n total\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n', -): (typeof documents)['\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n total\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; + source: '\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n }\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n', +): (typeof documents)['\n query FetchAnalyticsTeamLeadership($limit: Int, $skip: Int) {\n teamsCollection(order: displayName_ASC, limit: $limit, skip: $skip) {\n total\n items {\n sys {\n id\n }\n displayName\n inactiveSince\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n }\n }\n teamMembershipCollection(limit: 20) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n alumniSinceDate\n linkedFrom {\n interestGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupMembersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n workingGroupLeadersCollection(limit: 3) {\n items {\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/packages/contentful/src/crn/autogenerated-gql/graphql.ts b/packages/contentful/src/crn/autogenerated-gql/graphql.ts index 229cf39fca..523f629b16 100644 --- a/packages/contentful/src/crn/autogenerated-gql/graphql.ts +++ b/packages/contentful/src/crn/autogenerated-gql/graphql.ts @@ -10328,9 +10328,9 @@ export type FetchAnalyticsTeamLeadershipQuery = { Pick & { sys: Pick; linkedFrom?: Maybe<{ - interestGroupsCollection?: Maybe< - Pick - >; + interestGroupsCollection?: Maybe<{ + items: Array }>>; + }>; teamMembershipCollection?: Maybe<{ items: Array< Maybe<{ @@ -22434,7 +22434,28 @@ export const FetchAnalyticsTeamLeadershipDocument = { selections: [ { kind: 'Field', - name: { kind: 'Name', value: 'total' }, + name: { kind: 'Name', value: 'items' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'sys' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { + kind: 'Name', + value: 'id', + }, + }, + ], + }, + }, + ], + }, }, ], }, diff --git a/packages/contentful/src/crn/queries/analytics.queries.ts b/packages/contentful/src/crn/queries/analytics.queries.ts index dff6ae121c..8d01410697 100644 --- a/packages/contentful/src/crn/queries/analytics.queries.ts +++ b/packages/contentful/src/crn/queries/analytics.queries.ts @@ -14,7 +14,11 @@ export const FETCH_ANALYTICS_TEAM_LEADERSHIP = gql` inactiveSince linkedFrom { interestGroupsCollection(limit: 10) { - total + items { + sys { + id + } + } } teamMembershipCollection(limit: 20) { items {