monarch-initiative / monarch-app

Monarch Initiative website and API
https://monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
17 stars 4 forks source link

Backend: associations/all endpoint only looks at first category #240

Open oneilsh opened 1 year ago

oneilsh commented 1 year ago

When using multiple categories, it looks like only the first category is considered. For example, example https://api-v3.monarchinitiative.org/v3/api/association/all?category=biolink%3ACausalGeneTo[…]&entity=MONDO%3A0009061&direct=true&limit=200&offset=0 returns one results (the causal gene), while https://api-v3.monarchinitiative.org/v3/api/association/all?category=biolink%3ADiseaseToPhe[…]&entity=MONDO%3A0009061&direct=true&limit=200&offset=0 returns 62, all phenotype associations.

kevinschaper commented 1 year ago

I see it, it's generating a query that looks like:

'category:biolink\\:CausalGeneToDiseaseAssociation OR biolink\\:DiseaseToPhenotypicFeatureAssociation'