Skip to content

Commit

Permalink
feat: make gene claim category search case-insensitive (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl authored Jun 4, 2024
1 parent 1e0bf5e commit d34315f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/app/graphql/resolvers/genes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Resolvers::Genes < GraphQL::Schema::Resolver

# gene claim category by name
option(:gene_claim_category, type: [String], description: "Filtering on gene claim category name.") do |scope, values|
scope.joins(gene_claims: :gene_claim_categories).where('gene_claim_categories.name IN (?)', values)
lowercase_values = values.map(&:downcase)
scope.joins(gene_claims: :gene_claim_categories).where('LOWER(gene_claim_categories.name) IN (?)', lowercase_values)
end

option(:interaction_type, type: String, description: 'Exact filtering on interaction claim type.') do |scope, value|
Expand Down

0 comments on commit d34315f

Please sign in to comment.