diff --git a/frontend/src/components/RecordsList.tsx b/frontend/src/components/RecordsList.tsx index bf11c029..fca07170 100644 --- a/frontend/src/components/RecordsList.tsx +++ b/frontend/src/components/RecordsList.tsx @@ -113,6 +113,11 @@ export default function RecordsList({ [`${dataName}ConnectionWhere2`]: { OR: queryFilterWhereVariables(parsedSearchVals), }, + hasCohortSampleSamplesWhere2: { + hasMetadataSampleMetadata_SOME: { + primaryId_IN: parsedSearchVals, + }, + }, options: { offset: params.request.startRow, limit: params.request.endRow, diff --git a/frontend/src/generated/graphql.ts b/frontend/src/generated/graphql.ts index ea65d978..19f100a7 100644 --- a/frontend/src/generated/graphql.ts +++ b/frontend/src/generated/graphql.ts @@ -11555,6 +11555,8 @@ export type CohortsListQueryVariables = Exact<{ options?: InputMaybe; cohortsConnectionWhere2?: InputMaybe; hasCohortCompleteCohortCompletesOptions2?: InputMaybe; + hasCohortSampleSamplesWhere2?: InputMaybe; + hasCohortSampleSamplesConnectionWhere2?: InputMaybe; }>; export type CohortsListQuery = { @@ -12146,6 +12148,8 @@ export const CohortsListDocument = gql` $options: CohortOptions $cohortsConnectionWhere2: CohortWhere $hasCohortCompleteCohortCompletesOptions2: CohortCompleteOptions + $hasCohortSampleSamplesWhere2: SampleWhere + $hasCohortSampleSamplesConnectionWhere2: CohortHasCohortSampleSamplesConnectionWhere ) { cohortsConnection(where: $cohortsConnectionWhere2) { totalCount @@ -12163,10 +12167,12 @@ export const CohortsListDocument = gql` status date } - hasCohortSampleSamplesConnection { + hasCohortSampleSamplesConnection( + where: $hasCohortSampleSamplesConnectionWhere2 + ) { totalCount } - hasCohortSampleSamples { + hasCohortSampleSamples(where: $hasCohortSampleSamplesWhere2) { smileSampleId hasTempoTempos { smileTempoId @@ -12193,6 +12199,8 @@ export const CohortsListDocument = gql` * options: // value for 'options' * cohortsConnectionWhere2: // value for 'cohortsConnectionWhere2' * hasCohortCompleteCohortCompletesOptions2: // value for 'hasCohortCompleteCohortCompletesOptions2' + * hasCohortSampleSamplesWhere2: // value for 'hasCohortSampleSamplesWhere2' + * hasCohortSampleSamplesConnectionWhere2: // value for 'hasCohortSampleSamplesConnectionWhere2' * }, * }); */ diff --git a/frontend/src/pages/cohorts/CohortsPage.tsx b/frontend/src/pages/cohorts/CohortsPage.tsx index e8294b21..6a5f7391 100644 --- a/frontend/src/pages/cohorts/CohortsPage.tsx +++ b/frontend/src/pages/cohorts/CohortsPage.tsx @@ -57,6 +57,13 @@ function cohortFilterWhereVariables(parsedSearchVals: string[]): CohortWhere[] { date_IN: parsedSearchVals, }, }, + { + hasCohortSampleSamples_SOME: { + hasMetadataSampleMetadata_SOME: { + primaryId_IN: parsedSearchVals, + }, + }, + }, ]; } else { return [ @@ -96,6 +103,13 @@ function cohortFilterWhereVariables(parsedSearchVals: string[]): CohortWhere[] { date_CONTAINS: parsedSearchVals[0], }, }, + { + hasCohortSampleSamples_SOME: { + hasMetadataSampleMetadata_SOME: { + primaryId_CONTAINS: parsedSearchVals[0], + }, + }, + }, ]; } } diff --git a/graphql-server/src/generated/graphql.ts b/graphql-server/src/generated/graphql.ts index fa90eb2e..82ee941f 100644 --- a/graphql-server/src/generated/graphql.ts +++ b/graphql-server/src/generated/graphql.ts @@ -11554,6 +11554,8 @@ export type CohortsListQueryVariables = Exact<{ options?: InputMaybe; cohortsConnectionWhere2?: InputMaybe; hasCohortCompleteCohortCompletesOptions2?: InputMaybe; + hasCohortSampleSamplesWhere2?: InputMaybe; + hasCohortSampleSamplesConnectionWhere2?: InputMaybe; }>; export type CohortsListQuery = { @@ -11874,6 +11876,8 @@ export const CohortsListDocument = gql` $options: CohortOptions $cohortsConnectionWhere2: CohortWhere $hasCohortCompleteCohortCompletesOptions2: CohortCompleteOptions + $hasCohortSampleSamplesWhere2: SampleWhere + $hasCohortSampleSamplesConnectionWhere2: CohortHasCohortSampleSamplesConnectionWhere ) { cohortsConnection(where: $cohortsConnectionWhere2) { totalCount @@ -11891,10 +11895,12 @@ export const CohortsListDocument = gql` status date } - hasCohortSampleSamplesConnection { + hasCohortSampleSamplesConnection( + where: $hasCohortSampleSamplesConnectionWhere2 + ) { totalCount } - hasCohortSampleSamples { + hasCohortSampleSamples(where: $hasCohortSampleSamplesWhere2) { smileSampleId hasTempoTempos { smileTempoId diff --git a/graphql/operations.graphql b/graphql/operations.graphql index 6085036d..c9583613 100644 --- a/graphql/operations.graphql +++ b/graphql/operations.graphql @@ -234,6 +234,8 @@ query CohortsList( $options: CohortOptions $cohortsConnectionWhere2: CohortWhere $hasCohortCompleteCohortCompletesOptions2: CohortCompleteOptions + $hasCohortSampleSamplesWhere2: SampleWhere + $hasCohortSampleSamplesConnectionWhere2: CohortHasCohortSampleSamplesConnectionWhere ) { cohortsConnection(where: $cohortsConnectionWhere2) { totalCount @@ -251,10 +253,12 @@ query CohortsList( status date } - hasCohortSampleSamplesConnection { + hasCohortSampleSamplesConnection( + where: $hasCohortSampleSamplesConnectionWhere2 + ) { totalCount } - hasCohortSampleSamples { + hasCohortSampleSamples(where: $hasCohortSampleSamplesWhere2) { smileSampleId hasTempoTempos { smileTempoId