Skip to content

Commit

Permalink
KPMP-5366: update names of graphql queries
Browse files Browse the repository at this point in the history
  • Loading branch information
HaneenT committed Nov 11, 2024
1 parent 3a2af6f commit 1ebe59c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/helpers/ApolloClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export const fetchGeneExpression = async (dataType, geneSymbol, cellType, enroll
export const fetchRegionalTranscriptomics = async (comparisonType, geneSymbol) => {
let query = gql`
query {
getRTGeneExpressionByTissue(comparisonType:"${comparisonType}", geneSymbol: "${geneSymbol}") {
getRTGeneExpressionByEnrollment(comparisonType:"${comparisonType}", geneSymbol: "${geneSymbol}") {
aki {
id
segment
Expand Down Expand Up @@ -318,8 +318,8 @@ export const fetchRegionalTranscriptomics = async (comparisonType, geneSymbol) =
fetchPolicy: 'cache-first'
});

if (response.data && response.data.getRTGeneExpressionByTissue) {
return response.data.getRTGeneExpressionByTissue;
if (response.data && response.data.getRTGeneExpressionByEnrollment) {
return response.data.getRTGeneExpressionByEnrollment;
} else {
store.dispatch(sendMessageToBackend("Could not retrieve regional transcriptomics data: " + response.error));
}
Expand All @@ -329,7 +329,7 @@ export const fetchRegionalTranscriptomics = async (comparisonType, geneSymbol) =
export const fetchRegionalProteomics = async (geneSymbol) => {
let query = gql`
query {
getRPGeneExpressionByTissue(geneSymbol: "${geneSymbol}") {
getRPGeneExpressionByEnrollment(geneSymbol: "${geneSymbol}") {
accession
rpExpressionByEnrollmentCategory {
all {
Expand Down Expand Up @@ -357,8 +357,8 @@ export const fetchRegionalProteomics = async (geneSymbol) => {
fetchPolicy: 'cache-first'
});

if (response.data && response.data.getRPGeneExpressionByTissue) {
return response.data.getRPGeneExpressionByTissue;
if (response.data && response.data.getRPGeneExpressionByEnrollment) {
return response.data.getRPGeneExpressionByEnrollment;
} else {
store.dispatch(sendMessageToBackend("Could not retrieve regional proteomics data: " + response.error));
}
Expand Down Expand Up @@ -473,7 +473,7 @@ export const fetchEnrollmentCategorySummaryCounts = async () => {
if (response.data && response.data.getEnrollmentCategorySummaryData) {
return response.data.getEnrollmentCategorySummaryData[0];
}else {
store.dispatch(sendMessageToBackend("Could not retrieve tissue summary: " + response.error));
store.dispatch(sendMessageToBackend("Could not retrieve enrollment category summary: " + response.error));
}
}

Expand Down

0 comments on commit 1ebe59c

Please sign in to comment.