Skip to content

Commit

Permalink
scope gene variants query to exclude deprecated variants
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Jan 16, 2024
1 parent 4d4d7ee commit cd6537b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/app/graphql/resolvers/variants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Resolvers::Variants < GraphQL::Schema::Resolver

description 'List and filter variants.'

scope { object.variants.order('variants.name ASC').distinct }
scope { object.variants.where(deprecated: false).order('variants.name ASC').distinct }

option(:name, type: GraphQL::Types::String, description: 'Left anchored filtering for variant name and aliases.') do |scope, value|
scope.left_joins(:variant_aliases)
Expand Down

0 comments on commit cd6537b

Please sign in to comment.