Skip to content

Call superclasses? #283

@cbizon

Description

@cbizon
{
    "message": {
        "query_graph": {
            "edges": {
                "e01": {
                    "object": "n0",
                    "subject": "n1",
                    "predicates": [
                        "biolink:entity_negatively_regulates_entity"
                    ]
                }
            },
            "nodes": {
                "n0": {
                    "ids": [
                        "NCBIGene:23221"
                    ],
                    "categories": [
                        "biolink:Gene"
                    ]
                },
                "n1": {
                    "categories": [
                        "biolink:SmallMolecule"
                    ]
                }
            }
        }
    }
}

Spoke is returning at least one result. But aragorn never calls spoke. This is because spoke has in its meta_knowledge_graph an edge between Gene and ChemicalEntity, rather than SmallMolecule. Now, if you take the result that spoke returned and put it in node norm, it gets recognized as a small molecule.

Should we call things that offer superclasses of what we're looking for and then see if we can downcast them? I don't really think so, but it might make sense in some cases e.g. external APIs where the way things are structured make it hard to be precise, even if the returned values can be more precisely typed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions