Closed edeutsch closed 2 years ago
Just to verify, does this mean that this query would be invalid (no predicate)?
{
"message": {
"query_graph": {
"edges": {
"e00": {
"subject": "n01",
"object": "n00"
}
},
"nodes": {
"n00": {
"categories": ["biolink:Gene"]
},
"n01": {
"ids": ["MONDO:0011936"],
"categories": ["biolink:DiseaseOrPhenotypicFeature"]
}
}
}
}
}
Correct, that would become a schema violation. Is that okay? Or do we want to support such loose queries? If one simply added a predicate biolink:related_to, that would have the same meaning I suppose, and would be legal under the proposed scheme.
Should we also require categories then on nodes? Just trying to stay consistent on the rules for the json query. The more explicit we make the query, the easier it will be for the new user to be able to build a query from scratch should they not use the UI or other query building tool.
I think the general sentiment was that if you specify a CURIE, then a category was either redundant or potentially conflicting. Many felt that if you provide a CURIE, you should not provide a category. But there was some disagreement as well.
@marcdubybroad actually the PR only specifies that a knowledge-graph edge is required; predicate in QEdge remains optional and your query example will still be valid.
Make predicate required and not nullable and clean up examples, definitions, and make the allOf to oneOf switch for validator compatibility