Skip to content

Commit

Permalink
feat: CQDG-27 variants and genes suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
adipaul1981 committed Nov 2, 2023
1 parent c8561b5 commit ce1930d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/graphql/genes/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from '@apollo/client';

export const CHECK_GENE_MATCH_QUERY = gql`
query CheckGenesMatch($sqon: JSON, $first: Int, $offset: Int) {
Genes {
Gene {
hits(filters: $sqon, first: $first, offset: $offset) {
edges {
node {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export const getFacetsDictionary = () => ({
},
variant_class: intl.get('entities.variant.variant_class'),
variant_external_reference: intl.get('entities.variant.variant_external_reference'),
locus: intl.get('entities.variant.variant'),
consequences: {
consequence: intl.get('entities.variant.consequences.consequence'),
consequences: intl.get('entities.variant.consequences.consequences'),
Expand All @@ -369,6 +370,7 @@ export const getFacetsDictionary = () => ({
},
},
genes: {
symbol: intl.get('entities.variant.gene'),
consequences: {
consequence: intl.get('entities.variant.consequences.consequence'),
consequences: intl.get('entities.variant.consequences.consequences'),
Expand Down
4 changes: 2 additions & 2 deletions src/views/Variants/components/GeneUploadIds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const GenesUploadIds = ({ queryBuilderId }: IGenesUploadIdsProps) => (
},
});

const genes: IGeneEntity[] = hydrateResults(response.data?.data?.genes?.hits?.edges || []);
const genes: IGeneEntity[] = hydrateResults(response.data?.data?.Gene?.hits?.edges || []);

return genes?.flatMap((gene) => {
const matchedIds: string[] = ids.filter((id: string) => {
Expand Down Expand Up @@ -130,7 +130,7 @@ const GenesUploadIds = ({ queryBuilderId }: IGenesUploadIdsProps) => (
value: uniqueMatches.map((match) => match.mappedTo),
index: INDEXES.VARIANT,
merge_strategy: MERGE_VALUES_STRATEGIES.APPEND_VALUES,
isUploadedList: true,
overrideValuesName: intl.get('components.uploadIds.pillTitle'),
});
}}
/>
Expand Down

0 comments on commit ce1930d

Please sign in to comment.