Skip to content

Commit

Permalink
Merge pull request #983 from griffithlab/fix-variant-scopes
Browse files Browse the repository at this point in the history
The Variants resolver should exclude deprecated variants
  • Loading branch information
acoffman authored Jan 16, 2024
2 parents 4d4d7ee + cd6537b commit 3d72dae
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 3d72dae

Please sign in to comment.