diff --git a/graphql-api/src/graphql/resolvers/va.ts b/graphql-api/src/graphql/resolvers/va.ts index 441bf4e77..f602059cc 100644 --- a/graphql-api/src/graphql/resolvers/va.ts +++ b/graphql-api/src/graphql/resolvers/va.ts @@ -32,34 +32,13 @@ const POPULATION_NAMES: Record = { unk: 'Unknown', } -const resolveVAQuery = async (_obj: any, _args: any, _ctx: any) => { - return { va: null, vrs: null } - /* const vrsApiUrl = process.env['VRS_API_URL'] - const variantId = normalizeVariantId(args.variantId) - const url = `${vrsApiUrl}/${variantId}` - const response = await fetch(url).catch((error: any) => { - throw error - }) - const responseData = await response.json() - const va = responseData.map((result: any) => result['gks_va_freq']) - const vrs = responseData.map((result: any) => result['gks_vrs_variant']) - return { va, vrs } - */ -} - -const resolveTypeFromTypeField = (obj: any) => { - return `VA${obj.type}` -} - // "VANumber" because "Number" is taken type VANumber = { type: string; value: number } -type Numberlike = VANumber - type SequenceInterval = { type: string - start: Numberlike - end: Numberlike + start: VANumber + end: VANumber } type SequenceLocation = { @@ -412,10 +391,6 @@ export const resolveVACohortAlleleFrequencies = async ( } const resolvers = { - Query: { - va: resolveVAQuery, - }, - VANumberlike: { __resolveType: resolveTypeFromTypeField }, VASequenceInterval: { // Workaround for bug in some upstream API versions that omit this type in SequenceIntervals type: (obj: any) => obj.type || 'SequenceInterval', diff --git a/graphql-api/src/graphql/types/query.graphql b/graphql-api/src/graphql/types/query.graphql index 073afd707..2f16ba340 100644 --- a/graphql-api/src/graphql/types/query.graphql +++ b/graphql-api/src/graphql/types/query.graphql @@ -17,7 +17,10 @@ type Query { dataset: StructuralVariantDatasetId! ): StructuralVariantDetails @cost(value: 1) variant(variantId: String, rsid: String, dataset: DatasetId!): VariantDetails @cost(value: 1) - copy_number_variant(variantId: String!, dataset: CopyNumberVariantDatasetId!): CopyNumberVariantDetails @cost(value: 1) + copy_number_variant( + variantId: String! + dataset: CopyNumberVariantDatasetId! + ): CopyNumberVariantDetails @cost(value: 1) gene_search(query: String!, reference_genome: ReferenceGenomeId!): [GeneSearchResult!]! variant_search(query: String!, dataset: DatasetId!): [VariantSearchResult!]! @@ -34,6 +37,5 @@ type Query { short_tandem_repeats(dataset: DatasetId!): [ShortTandemRepeat!]! @cost(value: 10) - va(variantId: String!): VA! meta: BrowserMetadata! }