Skip to content

Commit 2719f3e

Browse files
committed
match query shape to fix pagination
1 parent fc82652 commit 2719f3e

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

client/src/app/components/variants/variants-menu/variants-menu.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ export class CvcVariantsMenuComponent implements OnInit {
8686
)
8787

8888
this.menuVariants$ = connection$.pipe(
89-
map((c) => c.nodes),
90-
filter(isNonNulled)
89+
map((c) => c.edges.map((e) => e.node), filter(isNonNulled))
9190
)
9291

9392
this.totalVariants$ = connection$.pipe(map((c) => c.totalCount))

client/src/app/components/variants/variants-menu/variants-menu.gql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ query VariantsMenu(
2727
hasPreviousPage
2828
hasNextPage
2929
}
30-
nodes {
31-
...menuVariant
30+
edges{
31+
cursor
32+
node {
33+
...menuVariant
34+
}
3235
}
3336
}
3437
}

client/src/app/generated/civic.apollo.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export type ActivityInterface = {
9090
/** The connection type for ActivityInterface. */
9191
export type ActivityInterfaceConnection = {
9292
__typename: 'ActivityInterfaceConnection';
93-
/** List of activity types that have occured on this entity. */
93+
/** List of activity types that have occurred on this entity. */
9494
activityTypes: Array<ActivityTypeInput>;
9595
/** A list of edges. */
9696
edges: Array<ActivityInterfaceEdge>;
@@ -1594,7 +1594,7 @@ export type EventConnection = {
15941594
__typename: 'EventConnection';
15951595
/** A list of edges. */
15961596
edges: Array<EventEdge>;
1597-
/** List of event types that have occured on this entity. */
1597+
/** List of event types that have occurred on this entity. */
15981598
eventTypes: Array<EventAction>;
15991599
/** A list of nodes. */
16001600
nodes: Array<Event>;
@@ -3305,7 +3305,7 @@ export enum MolecularProfileDisplayFilter {
33053305
WithAccepted = 'WITH_ACCEPTED',
33063306
/** Display only molecular profiles which have evidence in either an accepted or submitted state. */
33073307
WithAcceptedOrSubmitted = 'WITH_ACCEPTED_OR_SUBMITTED',
3308-
/** Display molecular profiles which have at least one submited evidence item. */
3308+
/** Display molecular profiles which have at least one submitted evidence item. */
33093309
WithSubmitted = 'WITH_SUBMITTED'
33103310
}
33113311

@@ -3415,7 +3415,7 @@ export type Mutation = {
34153415
*/
34163416
rejectRevisions?: Maybe<RejectRevisionsPayload>;
34173417
/**
3418-
* Resolve a flag on a CIViC entity indicating that it was either erronously flagged or the issue has been resolved.
3418+
* Resolve a flag on a CIViC entity indicating that it was either erroneously flagged or the issue has been resolved.
34193419
* Any user may resolve their own flag however only editors with valid conflict
34203420
* of interest statements can resolve other flags.
34213421
*/
@@ -3448,7 +3448,7 @@ export type Mutation = {
34483448
suggestVariantGroupRevision?: Maybe<SuggestVariantGroupRevisionPayload>;
34493449
/** Unsubscribe from a CIViC entity to stop receiving notifications about it. */
34503450
unsubscribe?: Maybe<UnsubscribePayload>;
3451-
/** Update the currentlly logged in User's Conflict of Interest statement */
3451+
/** Update the currently logged in User's Conflict of Interest statement */
34523452
updateCoi?: Maybe<UpdateCoiPayload>;
34533453
/** Mark one or more notifications as read/unread. The notification IDs provided must belong to the requesting user. */
34543454
updateNotificationStatus?: Maybe<UpdateNotificationStatusPayload>;
@@ -3765,7 +3765,7 @@ export type NotificationConnection = {
37653765
__typename: 'NotificationConnection';
37663766
/** A list of edges. */
37673767
edges: Array<NotificationEdge>;
3768-
/** List of event types that have occured on this entity. */
3768+
/** List of event types that have occurred on this entity. */
37693769
eventTypes: Array<EventAction>;
37703770
/** Users who have mentioned you. */
37713771
mentioningUsers: Array<User>;
@@ -4265,6 +4265,8 @@ export type QueryActivitiesArgs = {
42654265
first?: InputMaybe<Scalars['Int']>;
42664266
last?: InputMaybe<Scalars['Int']>;
42674267
mode?: InputMaybe<EventFeedMode>;
4268+
occuredAfter?: InputMaybe<Scalars['ISO8601DateTime']>;
4269+
occuredBefore?: InputMaybe<Scalars['ISO8601DateTime']>;
42684270
organizationId?: InputMaybe<Array<Scalars['Int']>>;
42694271
sortBy?: InputMaybe<DateSort>;
42704272
subject?: InputMaybe<Array<SubscribableQueryInput>>;
@@ -7590,7 +7592,7 @@ export type VariantsMenuQueryVariables = Exact<{
75907592
}>;
75917593

75927594

7593-
export type VariantsMenuQuery = { __typename: 'Query', variants: { __typename: 'VariantInterfaceConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasPreviousPage: boolean, hasNextPage: boolean }, nodes: Array<{ __typename: 'FactorVariant', id: number, name: string, link: string, flagged: boolean } | { __typename: 'GeneVariant', id: number, name: string, link: string, flagged: boolean } | { __typename: 'Variant', id: number, name: string, link: string, flagged: boolean }> } };
7595+
export type VariantsMenuQuery = { __typename: 'Query', variants: { __typename: 'VariantInterfaceConnection', totalCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasPreviousPage: boolean, hasNextPage: boolean }, edges: Array<{ __typename: 'VariantInterfaceEdge', cursor: string, node?: { __typename: 'FactorVariant', id: number, name: string, link: string, flagged: boolean } | { __typename: 'GeneVariant', id: number, name: string, link: string, flagged: boolean } | { __typename: 'Variant', id: number, name: string, link: string, flagged: boolean } | undefined }> } };
75947596

75957597
export type VariantTypesForFeatureQueryVariables = Exact<{
75967598
featureId?: InputMaybe<Scalars['Int']>;
@@ -13347,8 +13349,11 @@ export const VariantsMenuDocument = gql`
1334713349
hasPreviousPage
1334813350
hasNextPage
1334913351
}
13350-
nodes {
13351-
...menuVariant
13352+
edges {
13353+
cursor
13354+
node {
13355+
...menuVariant
13356+
}
1335213357
}
1335313358
}
1335413359
}

0 commit comments

Comments
 (0)