Skip to content

Commit

Permalink
Merge pull request #1046 from griffithlab/fix-variant-menu-pagination
Browse files Browse the repository at this point in the history
Fix variant menu pagination
  • Loading branch information
acoffman authored Apr 26, 2024
2 parents 4162888 + 2719f3e commit 22c7aa0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ export class CvcVariantsMenuComponent implements OnInit {
)

this.menuVariants$ = connection$.pipe(
map((c) => c.nodes),
filter(isNonNulled)
map((c) => c.edges.map((e) => e.node), filter(isNonNulled))
)

this.totalVariants$ = connection$.pipe(map((c) => c.totalCount))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ query VariantsMenu(
hasPreviousPage
hasNextPage
}
nodes {
...menuVariant
edges{
cursor
node {
...menuVariant
}
}
}
}
Expand Down
23 changes: 14 additions & 9 deletions client/src/app/generated/civic.apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export type ActivityInterface = {
/** The connection type for ActivityInterface. */
export type ActivityInterfaceConnection = {
__typename: 'ActivityInterfaceConnection';
/** List of activity types that have occured on this entity. */
/** List of activity types that have occurred on this entity. */
activityTypes: Array<ActivityTypeInput>;
/** A list of edges. */
edges: Array<ActivityInterfaceEdge>;
Expand Down Expand Up @@ -1594,7 +1594,7 @@ export type EventConnection = {
__typename: 'EventConnection';
/** A list of edges. */
edges: Array<EventEdge>;
/** List of event types that have occured on this entity. */
/** List of event types that have occurred on this entity. */
eventTypes: Array<EventAction>;
/** A list of nodes. */
nodes: Array<Event>;
Expand Down Expand Up @@ -3305,7 +3305,7 @@ export enum MolecularProfileDisplayFilter {
WithAccepted = 'WITH_ACCEPTED',
/** Display only molecular profiles which have evidence in either an accepted or submitted state. */
WithAcceptedOrSubmitted = 'WITH_ACCEPTED_OR_SUBMITTED',
/** Display molecular profiles which have at least one submited evidence item. */
/** Display molecular profiles which have at least one submitted evidence item. */
WithSubmitted = 'WITH_SUBMITTED'
}

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


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 }> } };
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 }> } };

export type VariantTypesForFeatureQueryVariables = Exact<{
featureId?: InputMaybe<Scalars['Int']>;
Expand Down Expand Up @@ -13347,8 +13349,11 @@ export const VariantsMenuDocument = gql`
hasPreviousPage
hasNextPage
}
nodes {
...menuVariant
edges {
cursor
node {
...menuVariant
}
}
}
}
Expand Down

0 comments on commit 22c7aa0

Please sign in to comment.