Showing
1 changed file
with
6 additions
and
26 deletions
| @@ -1503,32 +1503,12 @@ def query_graph(): | @@ -1503,32 +1503,12 @@ def query_graph(): | ||
| 1503 | return jsonify({ | 1503 | return jsonify({ |
| 1504 | 'success': True, | 1504 | 'success': True, |
| 1505 | 'result': { | 1505 | 'result': { |
| 1506 | - 'matched_nodes': [ | ||
| 1507 | - { | ||
| 1508 | - 'id': n.id, | ||
| 1509 | - 'type': n.type, | ||
| 1510 | - 'label': n.label, | ||
| 1511 | - 'properties': n.properties | ||
| 1512 | - } | ||
| 1513 | - for n in result.matched_nodes | ||
| 1514 | - ], | ||
| 1515 | - 'related_edges': [ | ||
| 1516 | - { | ||
| 1517 | - 'source': e.source, | ||
| 1518 | - 'target': e.target, | ||
| 1519 | - 'relation': e.relation | ||
| 1520 | - } | ||
| 1521 | - for e in result.related_edges | ||
| 1522 | - ], | ||
| 1523 | - 'expanded_nodes': [ | ||
| 1524 | - { | ||
| 1525 | - 'id': n.id, | ||
| 1526 | - 'type': n.type, | ||
| 1527 | - 'label': n.label, | ||
| 1528 | - 'properties': n.properties | ||
| 1529 | - } | ||
| 1530 | - for n in result.expanded_nodes | ||
| 1531 | - ] | 1506 | + 'matched_sections': result.matched_sections, |
| 1507 | + 'matched_queries': result.matched_queries, | ||
| 1508 | + 'matched_sources': result.matched_sources, | ||
| 1509 | + 'total_nodes': result.total_nodes, | ||
| 1510 | + 'query_params': result.query_params, | ||
| 1511 | + 'summary': result.get_summary() | ||
| 1532 | } | 1512 | } |
| 1533 | }) | 1513 | }) |
| 1534 | 1514 |
-
Please register or login to post a comment