-
Notifications
You must be signed in to change notification settings - Fork 8
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
Optimized sample dashboard query #162
Conversation
qcCompleteStatus: mostRecentQcComplete | ||
? mostRecentQcComplete.properties.status | ||
: null, | ||
cohortsHasCohortSample: [], |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
Refactor the samples query to call Neo4j directly
No description provided.