diff --git a/apps/crn-server/src/data-providers/contentful/research-output.data-provider.ts b/apps/crn-server/src/data-providers/contentful/research-output.data-provider.ts index f416a4d823..e52462b52b 100644 --- a/apps/crn-server/src/data-providers/contentful/research-output.data-provider.ts +++ b/apps/crn-server/src/data-providers/contentful/research-output.data-provider.ts @@ -27,7 +27,7 @@ import { ResearchOutputsOrder, RichTextFromQuery, } from '@asap-hub/contentful'; -import { cleanArray, parseUserDisplayName } from '@asap-hub/server-common'; +import { parseUserDisplayName } from '@asap-hub/server-common'; import { isSharingStatus } from '../transformers/research-output'; import { CreateResearchOutputOptions, @@ -333,9 +333,9 @@ const parseGraphQLResearchOutput = ( return { id: researchOutputs.sys.id, title: researchOutputs.title || '', - researchTheme: researchOutputs.researchTheme - ? cleanArray(researchOutputs.researchTheme) - : [], + researchTheme: (researchOutputs.teamsCollection?.items || []) + .map((teamItem) => teamItem?.researchTheme?.name) + .filter((item): item is string => item !== undefined), description: researchOutputs.description ? parseRichText(researchOutputs.description as RichTextFromQuery) : undefined, diff --git a/apps/crn-server/src/data-providers/contentful/user.data-provider.ts b/apps/crn-server/src/data-providers/contentful/user.data-provider.ts index 428c402195..035413d8a0 100644 --- a/apps/crn-server/src/data-providers/contentful/user.data-provider.ts +++ b/apps/crn-server/src/data-providers/contentful/user.data-provider.ts @@ -385,7 +385,12 @@ export const parseContentfulGraphQlUsers = (item: UserItem): UserDataObject => { interestGroups, onboarded: typeof item.onboarded === 'boolean' ? item.onboarded : undefined, email: item.email ?? '', - researchTheme: item.researchTheme ? cleanArray(item.researchTheme) : [], + researchTheme: teamsCollection + .map((teamItem) => teamItem.team?.researchTheme?.name) + .filter( + (researchThemeName): researchThemeName is string => + researchThemeName !== undefined, + ), contactEmail: item.contactEmail ?? undefined, firstName: item.firstName ?? '', middleName: item.middleName || undefined, @@ -650,6 +655,7 @@ const parseLeadersToInterestGroups = ( id: group?.sys.id, active: group?.active, name: group?.name, + role: leader.role, } as InterestGroupMembership); return interestGroups; diff --git a/apps/crn-server/src/routes/public/user.route.ts b/apps/crn-server/src/routes/public/user.route.ts index 44f2fc79ab..4e79a50952 100644 --- a/apps/crn-server/src/routes/public/user.route.ts +++ b/apps/crn-server/src/routes/public/user.route.ts @@ -61,6 +61,7 @@ const mapUserToPublicUser = (user: UserResponse): PublicUserResponse => ({ institution: user.institution, interestGroups: user.interestGroups.map((ig) => ({ name: ig.name, + role: ig.role, })), labs: user.labs, researchTheme: user.researchTheme, diff --git a/apps/crn-server/test/data-providers/contentful/research-output.data-provider.test.ts b/apps/crn-server/test/data-providers/contentful/research-output.data-provider.test.ts index a1f93c54d9..ffef8a8d97 100644 --- a/apps/crn-server/test/data-providers/contentful/research-output.data-provider.test.ts +++ b/apps/crn-server/test/data-providers/contentful/research-output.data-provider.test.ts @@ -412,7 +412,7 @@ describe('Research Outputs Data Provider', () => { test('Should default missing research theme to an empty array', async () => { const researchOutputs = getContentfulResearchOutputGraphqlResponse(); - researchOutputs.researchTheme = null; + researchOutputs.teamsCollection!.items[0]!.researchTheme = null; contentfulGraphqlClientMock.request.mockResolvedValueOnce({ researchOutputs, }); @@ -707,36 +707,6 @@ describe('Research Outputs Data Provider', () => { ]); }); - test('Should return the research output without the team', async () => { - const researchOutputs = getContentfulResearchOutputGraphqlResponse(); - researchOutputs.teamsCollection!.items = []; - researchOutputs.workingGroup = { sys: { id: '1' }, title: 'wg' }; - researchOutputs.researchTheme = [ - 'PD Functional Genomics', - 'Neuro-Immune Interactions', - ]; - contentfulGraphqlClientMock.request.mockResolvedValueOnce({ - researchOutputs, - }); - - const result = await researchOutputDataProvider.fetchById('1'); - - const expectedResult = getResearchOutputDataObject(); - expectedResult.usageNotesMD = researchOutputs.usageNotes as string; - expectedResult.usageNotes = undefined; - expectedResult.authors = []; - expectedResult.teams = []; - expectedResult.contactEmails = []; // as there are no referencing teams, there won't be any PMs - expectedResult.workingGroups = [{ title: 'wg', id: '1' }]; - expectedResult.publishingEntity = 'Working Group'; - expectedResult.researchTheme = [ - 'PD Functional Genomics', - 'Neuro-Immune Interactions', - ]; - - expect(result).toEqual(expectedResult); - }); - test('Should return a mix of internal and external authors', async () => { const researchOutputs = getContentfulResearchOutputGraphqlResponse(); const user1 = { diff --git a/apps/crn-server/test/data-providers/contentful/users.data-provider.test.ts b/apps/crn-server/test/data-providers/contentful/users.data-provider.test.ts index 46d8b64109..e1a5ae164f 100644 --- a/apps/crn-server/test/data-providers/contentful/users.data-provider.test.ts +++ b/apps/crn-server/test/data-providers/contentful/users.data-provider.test.ts @@ -82,6 +82,7 @@ describe('User data provider', () => { name: 'interest-group-2', }, { + role: 'Project Manager', active: true, id: 'interest-group-leader-1', name: 'Interest Group Leader 1', @@ -383,10 +384,11 @@ describe('User data provider', () => { test('Should default missing research theme to an empty array', async () => { const id = 'user-id-1'; + const contentfulUser = getContentfulGraphqlUser(); + contentfulUser.teamsCollection!.items[0]!.team!.researchTheme = null; + contentfulGraphqlClientMock.request.mockResolvedValueOnce({ - users: getContentfulGraphqlUser({ - researchTheme: null, - }), + users: contentfulUser, }); const response = await userDataProvider.fetchById(id); @@ -740,6 +742,7 @@ describe('User data provider', () => { }, { active: true, + role: 'Project Manager', id: 'interest-group-leader-1', name: 'Interest Group Leader 1', }, diff --git a/apps/crn-server/test/fixtures/research-output.fixtures.ts b/apps/crn-server/test/fixtures/research-output.fixtures.ts index 852e4237ab..2bc6eb4cde 100644 --- a/apps/crn-server/test/fixtures/research-output.fixtures.ts +++ b/apps/crn-server/test/fixtures/research-output.fixtures.ts @@ -433,6 +433,9 @@ export const getContentfulResearchOutputGraphqlResponse = id: 'team-id-0', }, displayName: 'Team A', + researchTheme: { + name: 'PD Functional Genomics', + }, }, ], }, diff --git a/apps/crn-server/test/fixtures/users.fixtures.ts b/apps/crn-server/test/fixtures/users.fixtures.ts index c677fe032f..7788a19c04 100644 --- a/apps/crn-server/test/fixtures/users.fixtures.ts +++ b/apps/crn-server/test/fixtures/users.fixtures.ts @@ -138,7 +138,7 @@ export const getUserResponse = (): UserResponse => ({ { id: 'cd7be4902', name: 'Brighton' }, { id: 'cd7be4903', name: 'Liverpool' }, ], - researchTheme: ['PD Functional Genomics', 'Neuro-Immune Interactions'], + researchTheme: ['PD Functional Genomics'], }); export const getUserListItemDataObject = (): UserListItemDataObject => ({ @@ -225,7 +225,7 @@ export const getPublicUserResponse = (): PublicUserResponse => ({ { id: 'cd7be4902', name: 'Brighton' }, { id: 'cd7be4903', name: 'Liverpool' }, ], - researchTheme: ['PD Functional Genomics', 'Neuro-Immune Interactions'], + researchTheme: ['PD Functional Genomics'], researchOutputs: ['research-output-id'], }); @@ -321,7 +321,7 @@ export const getUserDataObject = (): UserDataObject => ({ { id: '4', name: 'expertise 4' }, { id: '5', name: 'expertise 5' }, ], - researchTheme: ['PD Functional Genomics', 'Neuro-Immune Interactions'], + researchTheme: ['PD Functional Genomics'], researchOutputs: [], institution: 'some institution', jobTitle: 'some job title', @@ -472,7 +472,6 @@ export const getContentfulGraphqlUser = ( { sys: { id: '5' }, name: 'expertise 5' }, ], }, - researchTheme: ['PD Functional Genomics', 'Neuro-Immune Interactions'], institution: 'some institution', jobTitle: 'some job title', reachOut: 'some reach out', @@ -516,6 +515,9 @@ export const getContentfulGraphqlUser = ( linkedFrom: { interestGroupsCollection: getInterestGroupsCollection(), }, + researchTheme: { + name: 'PD Functional Genomics', + }, proposal: { sys: { id: 'proposalId1', @@ -669,25 +671,31 @@ const getWorkingGroupCollection = () => ({ ], }); -const getInterestGroupLeadersCollection = () => ({ - items: [ - { - linkedFrom: { - interestGroupsCollection: { - items: [ - { - sys: { - id: 'interest-group-leader-1', +type InterestGroupLeadersCollection = NonNullable< + NonNullable['users']>['linkedFrom'] +>['interestGroupLeadersCollection']; + +const getInterestGroupLeadersCollection: () => InterestGroupLeadersCollection = + () => ({ + items: [ + { + role: 'Project Manager', + linkedFrom: { + interestGroupsCollection: { + items: [ + { + sys: { + id: 'interest-group-leader-1', + }, + active: true, + name: 'Interest Group Leader 1', }, - active: true, - name: 'Interest Group Leader 1', - }, - ], + ], + }, }, }, - }, - ], -}); + ], + }); export const getUserContentfulWebhookDetail = ( id: string, diff --git a/packages/contentful/src/crn/autogenerated-gql/gql.ts b/packages/contentful/src/crn/autogenerated-gql/gql.ts index a1e28dafb3..19f44080f0 100644 --- a/packages/contentful/src/crn/autogenerated-gql/gql.ts +++ b/packages/contentful/src/crn/autogenerated-gql/gql.ts @@ -91,7 +91,7 @@ const documents = { types.FetchRemindersDocument, '\n query FetchTeamProjectManager($id: String!) {\n teamMembershipCollection(\n where: {\n AND: [{ team: { sys: { id: $id } } }, { role: "Project Manager" }]\n }\n ) {\n items {\n linkedFrom {\n usersCollection(limit: 1) {\n total\n items {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n': types.FetchTeamProjectManagerDocument, - '\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n researchTheme\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n': + '\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n researchTheme {\n name\n }\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n': types.ResearchOutputsContentFragmentDoc, '\n query FetchResearchOutputById(\n $id: String!\n $preview: Boolean\n $fetchPMs: Boolean = true\n $singleOutput: Boolean = true\n ) {\n researchOutputs(id: $id, preview: $preview) {\n ...ResearchOutputsContent\n }\n }\n \n': types.FetchResearchOutputByIdDocument, @@ -113,7 +113,7 @@ const documents = { types.FetchTutorialByIdDocument, '\n query FetchTutorials($limit: Int, $skip: Int, $where: TutorialsFilter) {\n tutorialsCollection(\n limit: $limit\n skip: $skip\n where: $where\n order: addedDate_DESC\n ) {\n total\n items {\n ...TutorialsContent\n }\n }\n }\n \n': types.FetchTutorialsDocument, - '\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n researchTheme\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n': + '\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n researchTheme {\n name\n }\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n role\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n': types.UsersContentFragmentDoc, '\n query FetchPublicUsers(\n $limit: Int\n $skip: Int\n $order: [UsersOrder]\n $where: UsersFilter\n $publicUser: Boolean = true\n ) {\n usersCollection(limit: $limit, skip: $skip, order: $order, where: $where) {\n total\n items {\n ...UsersContent\n }\n }\n }\n \n': types.FetchPublicUsersDocument, @@ -387,8 +387,8 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n researchTheme\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n', -): (typeof documents)['\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n researchTheme\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n']; + source: '\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n researchTheme {\n name\n }\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n', +): (typeof documents)['\n fragment ResearchOutputsContent on ResearchOutputs {\n sys {\n id\n publishedVersion\n }\n title\n descriptionMd\n shortDescription\n link\n addedDate\n createdDate\n lastUpdatedPartial\n documentType\n sharingStatus\n labCatalogNumber\n doi\n accession\n rrid\n asapFunded\n usedInAPublication\n type\n publishDate\n description {\n json\n links {\n entries {\n inline {\n sys {\n id\n }\n __typename\n ... on Media {\n url\n }\n }\n }\n assets {\n block {\n sys {\n id\n }\n url\n description\n contentType\n width\n height\n }\n }\n }\n }\n usageNotes\n statusChangedBy {\n sys {\n id\n }\n firstName\n lastName\n email\n }\n statusChangedAt\n isInReview\n authorsCollection(limit: 100) {\n items {\n __typename\n ... on ExternalAuthors {\n sys {\n id\n }\n name\n orcid\n }\n ... on Users {\n sys {\n id\n }\n firstName\n nickname\n lastName\n email\n onboarded\n orcid\n alumniSinceDate\n avatar {\n url\n }\n }\n }\n }\n teamsCollection(limit: 20) {\n items {\n sys {\n id\n }\n displayName\n researchTheme {\n name\n }\n linkedFrom {\n teamMembershipCollection @include(if: $fetchPMs) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n usersCollection(limit: 1) {\n items {\n email\n }\n }\n }\n }\n }\n }\n }\n }\n workingGroup {\n sys {\n id\n }\n title\n }\n methodsCollection(limit: 5) {\n items {\n name\n }\n }\n keywordsCollection(limit: 20) {\n items {\n name\n }\n }\n organismsCollection(limit: 5) {\n items {\n name\n }\n }\n environmentsCollection(limit: 5) {\n items {\n name\n }\n }\n subtype {\n name\n }\n labsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n relatedResearchCollection(limit: 20) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n linkedFrom {\n researchOutputsCollection(limit: 60, order: [addedDate_ASC]) {\n items {\n sys {\n id\n }\n title\n type\n documentType\n teamsCollection(limit: 20) @include(if: $singleOutput) {\n items {\n sys {\n id\n }\n displayName\n }\n }\n workingGroup @include(if: $singleOutput) {\n sys {\n id\n }\n title\n }\n }\n }\n }\n relatedEventsCollection(limit: 10) {\n items {\n sys {\n id\n }\n title\n endDate\n }\n }\n versionsCollection {\n items {\n sys {\n id\n }\n title\n documentType\n type\n addedDate\n link\n rrid\n accession\n }\n }\n }\n']; /** * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -453,8 +453,8 @@ export function gql( * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function gql( - source: '\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n researchTheme\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n', -): (typeof documents)['\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n researchTheme\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n']; + source: '\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n researchTheme {\n name\n }\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n role\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\n }\n }\n }\n }\n }\n }\n }\n }\n', +): (typeof documents)['\n fragment UsersContent on Users {\n sys {\n id\n firstPublishedAt\n publishedAt\n publishedVersion\n }\n activeCampaignId\n lastUpdated\n alumniSinceDate\n alumniLocation\n biography\n connections\n createdDate\n degree\n email\n contactEmail\n dismissedGettingStarted\n firstName\n middleName\n lastName\n nickname\n institution\n jobTitle\n country\n stateOrProvince\n city\n onboarded\n orcid\n orcidLastModifiedDate\n orcidLastSyncDate\n orcidWorks\n questions\n expertiseAndResourceDescription\n github\n googleScholar\n linkedIn\n researcherId\n researchGate\n twitter\n website1\n website2\n role\n responsibilities\n researchInterests\n reachOut\n avatar {\n url\n }\n researchTagsCollection(limit: 20) {\n items {\n sys {\n id\n }\n name\n }\n }\n teamsCollection(limit: 10) {\n items {\n team {\n sys {\n id\n }\n displayName\n inactiveSince\n researchTheme {\n name\n }\n proposal {\n sys {\n id\n }\n }\n linkedFrom {\n interestGroupsCollection(limit: 10) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n role\n inactiveSinceDate\n }\n }\n labsCollection(limit: 10) {\n items {\n sys {\n id\n }\n name\n }\n }\n linkedFrom {\n workingGroupMembersCollection(limit: 10) {\n items {\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n workingGroupLeadersCollection(limit: 10) {\n items {\n role\n inactiveSinceDate\n linkedFrom {\n workingGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n title\n complete\n }\n }\n }\n user {\n lastName\n }\n }\n }\n interestGroupLeadersCollection(limit: 10) {\n items {\n role\n linkedFrom {\n interestGroupsCollection(limit: 1) {\n items {\n sys {\n id\n }\n active\n name\n }\n }\n }\n }\n }\n researchOutputsCollection @include(if: $publicUser) {\n items {\n sys {\n id\n }\n authorsCollection(limit: 20) {\n items {\n __typename\n ... on Users {\n sys {\n id\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 9c223487c6..ec00a0087a 100644 --- a/packages/contentful/src/crn/autogenerated-gql/graphql.ts +++ b/packages/contentful/src/crn/autogenerated-gql/graphql.ts @@ -609,14 +609,7 @@ export type ContentfulMetadata = { tags: Array>; }; -export type ContentfulMetadataConceptsFilter = { - id_contains_all?: InputMaybe>>; - id_contains_none?: InputMaybe>>; - id_contains_some?: InputMaybe>>; -}; - export type ContentfulMetadataFilter = { - concepts?: InputMaybe; tags?: InputMaybe; tags_exists?: InputMaybe; }; @@ -17588,7 +17581,6 @@ export type ResearchOutputsContentFragment = Pick< | 'asapFunded' | 'usedInAPublication' | 'type' - | 'researchTheme' | 'publishDate' | 'usageNotes' | 'statusChangedAt' @@ -17693,6 +17685,7 @@ export type ResearchOutputsContentFragment = Pick< Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; linkedFrom?: Maybe<{ teamMembershipCollection?: Maybe<{ items: Array< @@ -17815,7 +17808,6 @@ export type FetchResearchOutputByIdQuery = { | 'asapFunded' | 'usedInAPublication' | 'type' - | 'researchTheme' | 'publishDate' | 'usageNotes' | 'statusChangedAt' @@ -17934,6 +17926,7 @@ export type FetchResearchOutputByIdQuery = { Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; linkedFrom?: Maybe<{ teamMembershipCollection?: Maybe<{ items: Array< @@ -18068,7 +18061,6 @@ export type FetchResearchOutputsQuery = { | 'asapFunded' | 'usedInAPublication' | 'type' - | 'researchTheme' | 'publishDate' | 'usageNotes' | 'statusChangedAt' @@ -18220,6 +18212,7 @@ export type FetchResearchOutputsQuery = { Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; linkedFrom?: Maybe<{ teamMembershipCollection?: Maybe<{ items: Array< @@ -19118,7 +19111,6 @@ export type UsersContentFragment = Pick< | 'website1' | 'website2' | 'role' - | 'researchTheme' | 'responsibilities' | 'researchInterests' | 'reachOut' @@ -19138,6 +19130,7 @@ export type UsersContentFragment = Pick< team?: Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; proposal?: Maybe<{ sys: Pick }>; linkedFrom?: Maybe<{ interestGroupsCollection?: Maybe<{ @@ -19202,19 +19195,21 @@ export type UsersContentFragment = Pick< }>; interestGroupLeadersCollection?: Maybe<{ items: Array< - Maybe<{ - linkedFrom?: Maybe<{ - interestGroupsCollection?: Maybe<{ - items: Array< - Maybe< - Pick & { - sys: Pick; - } - > - >; + Maybe< + Pick & { + linkedFrom?: Maybe<{ + interestGroupsCollection?: Maybe<{ + items: Array< + Maybe< + Pick & { + sys: Pick; + } + > + >; + }>; }>; - }>; - }> + } + > >; }>; researchOutputsCollection?: Maybe<{ @@ -19286,7 +19281,6 @@ export type FetchPublicUsersQuery = { | 'website1' | 'website2' | 'role' - | 'researchTheme' | 'responsibilities' | 'researchInterests' | 'reachOut' @@ -19308,6 +19302,7 @@ export type FetchPublicUsersQuery = { team?: Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; proposal?: Maybe<{ sys: Pick }>; linkedFrom?: Maybe<{ interestGroupsCollection?: Maybe<{ @@ -19374,19 +19369,21 @@ export type FetchPublicUsersQuery = { }>; interestGroupLeadersCollection?: Maybe<{ items: Array< - Maybe<{ - linkedFrom?: Maybe<{ - interestGroupsCollection?: Maybe<{ - items: Array< - Maybe< - Pick & { - sys: Pick; - } - > - >; + Maybe< + Pick & { + linkedFrom?: Maybe<{ + interestGroupsCollection?: Maybe<{ + items: Array< + Maybe< + Pick & { + sys: Pick; + } + > + >; + }>; }>; - }>; - }> + } + > >; }>; researchOutputsCollection?: Maybe<{ @@ -19457,7 +19454,6 @@ export type FetchUserByIdQuery = { | 'website1' | 'website2' | 'role' - | 'researchTheme' | 'responsibilities' | 'researchInterests' | 'reachOut' @@ -19479,6 +19475,7 @@ export type FetchUserByIdQuery = { team?: Maybe< Pick & { sys: Pick; + researchTheme?: Maybe>; proposal?: Maybe<{ sys: Pick }>; linkedFrom?: Maybe<{ interestGroupsCollection?: Maybe<{ @@ -19543,19 +19540,21 @@ export type FetchUserByIdQuery = { }>; interestGroupLeadersCollection?: Maybe<{ items: Array< - Maybe<{ - linkedFrom?: Maybe<{ - interestGroupsCollection?: Maybe<{ - items: Array< - Maybe< - Pick & { - sys: Pick; - } - > - >; + Maybe< + Pick & { + linkedFrom?: Maybe<{ + interestGroupsCollection?: Maybe<{ + items: Array< + Maybe< + Pick & { + sys: Pick; + } + > + >; + }>; }>; - }>; - }> + } + > >; }>; researchOutputsCollection?: Maybe<{ @@ -22979,7 +22978,6 @@ export const ResearchOutputsContentFragmentDoc = { name: { kind: 'Name', value: 'usedInAPublication' }, }, { kind: 'Field', name: { kind: 'Name', value: 'type' } }, - { kind: 'Field', name: { kind: 'Name', value: 'researchTheme' } }, { kind: 'Field', name: { kind: 'Name', value: 'publishDate' } }, { kind: 'Field', @@ -23297,6 +23295,19 @@ export const ResearchOutputsContentFragmentDoc = { kind: 'Field', name: { kind: 'Name', value: 'displayName' }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'researchTheme' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'name' }, + }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'linkedFrom' }, @@ -24644,7 +24655,6 @@ export const UsersContentFragmentDoc = { { kind: 'Field', name: { kind: 'Name', value: 'website1' } }, { kind: 'Field', name: { kind: 'Name', value: 'website2' } }, { kind: 'Field', name: { kind: 'Name', value: 'role' } }, - { kind: 'Field', name: { kind: 'Name', value: 'researchTheme' } }, { kind: 'Field', name: { kind: 'Name', value: 'responsibilities' } }, { kind: 'Field', name: { kind: 'Name', value: 'researchInterests' } }, { kind: 'Field', name: { kind: 'Name', value: 'reachOut' } }, @@ -24743,6 +24753,19 @@ export const UsersContentFragmentDoc = { kind: 'Field', name: { kind: 'Name', value: 'inactiveSince' }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'researchTheme' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'name' }, + }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'proposal' }, @@ -25168,6 +25191,10 @@ export const UsersContentFragmentDoc = { selectionSet: { kind: 'SelectionSet', selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'role' }, + }, { kind: 'Field', name: { kind: 'Name', value: 'linkedFrom' }, diff --git a/packages/contentful/src/crn/queries/research-outputs.queries.ts b/packages/contentful/src/crn/queries/research-outputs.queries.ts index 84de283a77..689ac2a5c5 100644 --- a/packages/contentful/src/crn/queries/research-outputs.queries.ts +++ b/packages/contentful/src/crn/queries/research-outputs.queries.ts @@ -24,7 +24,6 @@ export const researchOutputContentQueryFragment = gql` asapFunded usedInAPublication type - researchTheme publishDate description { json @@ -98,6 +97,9 @@ export const researchOutputContentQueryFragment = gql` id } displayName + researchTheme { + name + } linkedFrom { teamMembershipCollection @include(if: $fetchPMs) { items { diff --git a/packages/contentful/src/crn/queries/users.queries.ts b/packages/contentful/src/crn/queries/users.queries.ts index f5ba1018f9..fcdc0ce6ee 100644 --- a/packages/contentful/src/crn/queries/users.queries.ts +++ b/packages/contentful/src/crn/queries/users.queries.ts @@ -46,7 +46,6 @@ export const usersContentQueryFragment = gql` website1 website2 role - researchTheme responsibilities researchInterests reachOut @@ -69,6 +68,9 @@ export const usersContentQueryFragment = gql` } displayName inactiveSince + researchTheme { + name + } proposal { sys { id @@ -140,6 +142,7 @@ export const usersContentQueryFragment = gql` } interestGroupLeadersCollection(limit: 10) { items { + role linkedFrom { interestGroupsCollection(limit: 1) { items { diff --git a/packages/contentful/src/crn/schema/autogenerated-schema.graphql b/packages/contentful/src/crn/schema/autogenerated-schema.graphql index 26dfd85dd7..7a47e2efb9 100644 --- a/packages/contentful/src/crn/schema/autogenerated-schema.graphql +++ b/packages/contentful/src/crn/schema/autogenerated-schema.graphql @@ -375,14 +375,7 @@ type ContentfulMetadata { tags: [ContentfulTag]! } -input ContentfulMetadataConceptsFilter { - id_contains_all: [String] - id_contains_none: [String] - id_contains_some: [String] -} - input ContentfulMetadataFilter { - concepts: ContentfulMetadataConceptsFilter tags: ContentfulMetadataTagsFilter tags_exists: Boolean } diff --git a/packages/model/src/interest-group.ts b/packages/model/src/interest-group.ts index f8978c43d6..3328e39d9d 100644 --- a/packages/model/src/interest-group.ts +++ b/packages/model/src/interest-group.ts @@ -74,4 +74,5 @@ export type InterestGroupMembership = { id: string; name: string; active: boolean; + role?: string; };