Skip to content

Commit

Permalink
Merge pull request #25 from biothings/fix_issue_23
Browse files Browse the repository at this point in the history
Add type node attributes in TRAPI response
  • Loading branch information
kevinxin90 authored Feb 1, 2021
2 parents 7fecd84 + 898c59e commit 5eb3fef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions __test__/integration/KnowledgeGraph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe("Testing KnowledgeGraph Module", () => {
expect(res).toHaveProperty("NCBIGene:1017");
expect(res["NCBIGene:1017"]).toHaveProperty("name", "CDK2");
expect(res["NCBIGene:1017"]).toHaveProperty("category", "biolink:Gene");
expect(res["NCBIGene:1017"].attributes[0]).toHaveProperty("type", "biolink:id");
})
})

Expand Down
6 changes: 4 additions & 2 deletions src/controllers/QueryGraphHandler/knowledge_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module.exports = class KnowledgeGraph {
attributes: [
{
name: "equivalent_identifiers",
value: helper._getInputEquivalentIds(record)
value: helper._getInputEquivalentIds(record),
type: "biolink:id"
}
]
}
Expand All @@ -42,7 +43,8 @@ module.exports = class KnowledgeGraph {
attributes: [
{
name: "equivalent_identifiers",
value: helper._getOutputEquivalentIds(record)
value: helper._getOutputEquivalentIds(record),
type: "biolink:id"
}
]
}
Expand Down

0 comments on commit 5eb3fef

Please sign in to comment.