Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized sample dashboard query #162

Merged

Conversation

mandawilson
Copy link
Contributor

No description provided.

qcCompleteStatus: mostRecentQcComplete
? mostRecentQcComplete.properties.status
: null,
cohortsHasCohortSample: [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this if it is not needed.

@@ -31,6 +31,11 @@ import {
sortArrayByNestedField,
} from "../utils/flattening";
import { ApolloServerContext } from "../utils/servers";
import {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these are used now - I was just trying stuff.

Query: {
// THIS ONE CAN BE CALLED FROM THE BROWSER
async sampleDashboardQuery(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was calling this from the browser with the following, but in the code we use the above method. Don't leave both!
query ExampleQuery { sampleDashboardQuery { primaryId }}

import { SortDirection } from "../generated/graphql";
import { ApolloServerContext } from "./servers";
//import { SamplesQueryResult } from "./dataloader";
import { runQuery } from "../schemas/neo4j";

const MAX_ROWS = 500;

export async function querySamplesList(
ogm: OGM,
where: GraphQLWhereArg,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have the oncotree data here, we can use it to set cancerType and cancerTypeDetailed.

@qu8n qu8n merged commit 44b11a6 into mskcc:samples-query-optimization Sep 26, 2024
2 checks passed
ao508 pushed a commit that referenced this pull request Sep 30, 2024
Refactor the samples query to call Neo4j directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants