From bab30140a34932ee72a633aa01c137b2998a71e8 Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Mon, 4 Nov 2024 11:54:34 -0600 Subject: [PATCH 1/3] fixed phenotypes/therapies row$ observables --- .../phenotypes-table/phenotypes-table.component.ts | 7 +++++-- .../therapies/therapies-table/therapies-table.component.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/app/components/phenotypes/phenotypes-table/phenotypes-table.component.ts b/client/src/app/components/phenotypes/phenotypes-table/phenotypes-table.component.ts index 298bbe83f..b05d22702 100644 --- a/client/src/app/components/phenotypes/phenotypes-table/phenotypes-table.component.ts +++ b/client/src/app/components/phenotypes/phenotypes-table/phenotypes-table.component.ts @@ -121,7 +121,7 @@ export class CvcPhenotypesTableComponent implements OnInit { // entity relay connection this.connection$ = this.result$.pipe( - pluck('data', 'phenotypes'), + pluck('data', 'browsePhenotypes'), filter(isNonNulled) ) as Observable @@ -195,7 +195,10 @@ export class CvcPhenotypesTableComponent implements OnInit { this.cdr.detectChanges() } - trackByIndex(_: number, data: Maybe): Maybe { + trackByIndex( + _: number, + data: Maybe + ): Maybe { return data?.id } } diff --git a/client/src/app/components/therapies/therapies-table/therapies-table.component.ts b/client/src/app/components/therapies/therapies-table/therapies-table.component.ts index f0fadfe55..e322d8fe4 100644 --- a/client/src/app/components/therapies/therapies-table/therapies-table.component.ts +++ b/client/src/app/components/therapies/therapies-table/therapies-table.component.ts @@ -122,7 +122,7 @@ export class CvcTherapiesTableComponent implements OnInit { ) // skip 1st true/false sequence this.connection$ = this.result$.pipe( - pluck('data', 'therapies'), + pluck('data', 'browseTherapies'), filter(isNonNulled) ) as Observable From 50670853a09c0fc4f1d58a803951bdc8cf1d0776 Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Mon, 4 Nov 2024 12:16:07 -0600 Subject: [PATCH 2/3] updated diseases, therapies type-policies --- .../src/app/graphql/graphql.type-policies.ts | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/client/src/app/graphql/graphql.type-policies.ts b/client/src/app/graphql/graphql.type-policies.ts index eda964fda..62e766915 100644 --- a/client/src/app/graphql/graphql.type-policies.ts +++ b/client/src/app/graphql/graphql.type-policies.ts @@ -73,7 +73,12 @@ export const CvcTypePolicies: StrictTypedTypePolicies = { 'status', 'submitterId', ]), - browseDiseases: relayStylePagination(['name', 'doid', 'geneNames', 'id']), + browseTherapies: relayStylePagination([ + 'name', + 'doid', + 'geneNames', + 'id', + ]), events: relayStylePagination([ 'subject', 'organizationId', @@ -141,8 +146,22 @@ export const CvcTypePolicies: StrictTypedTypePolicies = { 'resolvingUserId', 'state', ]), - phenotypes: relayStylePagination(['hpoId', 'name', 'id']), + browsePhenotypes: relayStylePagination(['hpoId', 'name', 'id', 'url']), variantTypes: relayStylePagination(['soid', 'name', 'id']), + browseDiseases: relayStylePagination([ + 'id', + 'name', + 'doid', + 'diseaseUrl', + 'features', + 'assertionCount', + 'evidenceItemCount', + 'variantCount', + 'featureCount', + 'link', + 'diseaseAliases', + 'deprecated', + ]), therapies: relayStylePagination(['ncitId', 'name', 'id']), clinicalTrials: relayStylePagination(['nctId', 'name', 'id']), notifications: relayStylePagination([ From 478f83cc64a9ae2fea7788c0323689fc0cf68a92 Mon Sep 17 00:00:00 2001 From: Joshua McMichael Date: Mon, 4 Nov 2024 12:32:14 -0600 Subject: [PATCH 3/3] fixed type policies --- .../src/app/graphql/graphql.type-policies.ts | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/client/src/app/graphql/graphql.type-policies.ts b/client/src/app/graphql/graphql.type-policies.ts index 62e766915..b3503f2e0 100644 --- a/client/src/app/graphql/graphql.type-policies.ts +++ b/client/src/app/graphql/graphql.type-policies.ts @@ -75,9 +75,9 @@ export const CvcTypePolicies: StrictTypedTypePolicies = { ]), browseTherapies: relayStylePagination([ 'name', - 'doid', - 'geneNames', - 'id', + 'ncitId', + 'therapyAlias', + 'sortBy', ]), events: relayStylePagination([ 'subject', @@ -146,21 +146,14 @@ export const CvcTypePolicies: StrictTypedTypePolicies = { 'resolvingUserId', 'state', ]), - browsePhenotypes: relayStylePagination(['hpoId', 'name', 'id', 'url']), + browsePhenotypes: relayStylePagination(['hpoId', 'name', 'sortBy']), variantTypes: relayStylePagination(['soid', 'name', 'id']), browseDiseases: relayStylePagination([ - 'id', 'name', 'doid', - 'diseaseUrl', - 'features', - 'assertionCount', - 'evidenceItemCount', - 'variantCount', - 'featureCount', - 'link', - 'diseaseAliases', - 'deprecated', + 'diseaseAlias', + 'featureName', + 'sortBy', ]), therapies: relayStylePagination(['ncitId', 'name', 'id']), clinicalTrials: relayStylePagination(['nctId', 'name', 'id']),