This repository has been archived by the owner on Mar 9, 2024. It is now read-only.
[BUG] minimum age gets melted into node API in query #316
Labels
bug:functional
Functional defects resulting from feature changes.
importance:urgent
We will address this as soon as possible.
type:bug
Defects in shipped code and fixes for those defects
Is there an existing issue for this?
Expected Behavior
I can run a query for a single node and define a minimum age
Current Behavior
if I set sex, all is well:
https://federate.neurobagel.org/query/?&node_url=https://api.neurobagel.org/&sex=snomed:248153007
if I set minimum age, this happens:
https://federate.neurobagel.org/query/?&node_url=https://api.neurobagel.org/min_age=1
Error message
federation API rightly complains that
"Unrecognized Neurobagel node URL(s): ['https://api.neurobagel.org/min_age=1/']
Environment
How to reproduce
Anything else?
see also OpenNeuroOrg/openneuro#2807
most likely this is our culprit:
https://github.com/neurobagel/query-tool/blob/dadbee332c593f95f5bab9bc037837f2241a6f76/components/QueryForm.vue#L222-L227
i.e. we do not concatenate
min_age
correctly.The reason this doesn't break for the "All" node is that we encode "All" as "no node parameter set":
https://federate.neurobagel.org/query/?min_age=1
so in this very specific case,
min_age
actually is the first query parameter and gets parsed correctly. This is most likely a leftover thing from when a query tool only ever talked directly to a node API and the federation API didn't exist yet.The text was updated successfully, but these errors were encountered: