diff --git a/client/src/app/generated/server.model.graphql b/client/src/app/generated/server.model.graphql index 5683946be..78792005f 100644 --- a/client/src/app/generated/server.model.graphql +++ b/client/src/app/generated/server.model.graphql @@ -8652,6 +8652,11 @@ type Query { """ id: Int + """ + Filter to evidence matching a list of EIDs + """ + ids: [Int!] + """ Returns the last _n_ elements from the list. """ diff --git a/client/src/app/generated/server.schema.json b/client/src/app/generated/server.schema.json index 04e71aaea..4966fe882 100644 --- a/client/src/app/generated/server.schema.json +++ b/client/src/app/generated/server.schema.json @@ -40045,6 +40045,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ids", + "description": "Filter to evidence matching a list of EIDs", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "variantId", "description": "Exact match filtering on the ID of the variant.", @@ -40370,6 +40390,43 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "factor", + "description": "Find a single gene by CIViC ID or NCIt ID", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ncitId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Factor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "factors", "description": "List and filter factors.", @@ -40707,6 +40764,31 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "fusion", + "description": "Find a single gene by CIViC ID", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Fusion", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "fusions", "description": "List and filter fusions.", diff --git a/server/app/graphql/resolvers/top_level_evidence_items.rb b/server/app/graphql/resolvers/top_level_evidence_items.rb index 62d51215e..838a01264 100644 --- a/server/app/graphql/resolvers/top_level_evidence_items.rb +++ b/server/app/graphql/resolvers/top_level_evidence_items.rb @@ -25,6 +25,9 @@ def generate_select(field = nil) option(:id, type: GraphQL::Types::Int, description: 'Exact match filtering on the ID of the evidence item.') do |scope, value| scope.where("evidence_items.id = ?", value) end + option(:ids, type: [GraphQL::Types::Int], description: 'Filter to evidence matching a list of EIDs') do |scope, value| + scope.where("evidence_items.id IN (?)", value) + end option(:variant_id, type: GraphQL::Types::Int, description: 'Exact match filtering on the ID of the variant.') do |scope, value| scope.joins(molecular_profile: [:variants]).where("variants.id = ?", value) end