The current UI generates messy TRAPI queries with extra fields that aren't necessary (and perhaps misleading). The name field should never appear in the query, nor should categories if ids exists. In other words, if ids is present, it should be the only key in a node object.
If we do include a name, it should be the preferred name coming from name res and never anything else. Right now if you enter an ID (curie) in the entity selector it populates the name with that ID as well, which is not correct.
If there are ids, categories can be left out completely.
If we do ignore categories when ids are present it solves this issue as well, but if not, we should only include one category (ideally the most specific one, in cases of conflation either most specific one) and not the entire hierarchy.
Taxa is being included in the TRAPI (due to coming from name res) in a way that doesn't do anything, it should be removed.
The current UI generates messy TRAPI queries with extra fields that aren't necessary (and perhaps misleading). The
name
field should never appear in the query, nor shouldcategories
ifids
exists. In other words, ifids
is present, it should be the only key in a node object.Example query
``` { "message": { "query_graph": { "nodes": { "n0": { "categories": [ "biolink:Gene" ], "name": "Gene" }, "n1": { "name": "Alzheimer disease", "categories": [ "biolink:Disease", "biolink:DiseaseOrPhenotypicFeature", "biolink:BiologicalEntity", "biolink:NamedThing", "biolink:ThingWithTaxon" ], "ids": [ "MONDO:0004975" ] } }, "edges": { "e0": { "subject": "n0", "object": "n1", "predicates": [ "biolink:related_to" ] } } } } } ```