dgidb / dgidb-v5

Providing interactions between drugs and genes sourced from a variety of publications and knowledgebases
https://dgidb.org
MIT License
14 stars 2 forks source link

Make names resolver behave like name in drugs query #476

Closed mcannon068nw closed 6 months ago

mcannon068nw commented 6 months ago

Within the graphql drugs resolvers:

https://github.com/dgidb/dgidb-v5/blob/main/server/app/graphql/resolvers/drugs.rb#L17

Names currently performs an exact match search rather than a left anchored search (as is the case in the name resolver). This results in users potentially missing out on data, and presents confounding behavior when comparing the two querys.

We should relax Names to perform a left anchored search similar to the behavior in Name.

Example:

{
  drugs(name: "PROPRANOLOL") {
    nodes {
      name
        }
  }
}

vs

{
  drugs(names: ["PROPRANOLOL"]) {
    nodes {
      name
    }
  }
}

Names requires the full name "PROPRANOLOL HYDROCHLORIDE" to return any results.

github-actions[bot] commented 6 months ago

Closed by #478.