diff --git a/html/admin/js/graphViewer/graph/foxxAdapter.js b/html/admin/js/graphViewer/graph/foxxAdapter.js
index 94f5e1efcd..2a2380a2e5 100644
--- a/html/admin/js/graphViewer/graph/foxxAdapter.js
+++ b/html/admin/js/graphViewer/graph/foxxAdapter.js
@@ -175,8 +175,8 @@ function FoxxAdapter(nodes, edges, route, config) {
parseResult = function (result, callback) {
var inserted = {},
- first = result.nodes[0];
- first = absAdapter.insertNode(first);
+ first = result.first;
+ first = absAdapter.insertNode(first);
_.each(result.nodes, function(n) {
n = absAdapter.insertNode(n);
inserted[n._id] = n;
diff --git a/html/admin/js/graphViewer/jasmine_test/specAdapter/foxxAdapterSpec.js b/html/admin/js/graphViewer/jasmine_test/specAdapter/foxxAdapterSpec.js
index 47a984501d..f6e608704c 100644
--- a/html/admin/js/graphViewer/jasmine_test/specAdapter/foxxAdapterSpec.js
+++ b/html/admin/js/graphViewer/jasmine_test/specAdapter/foxxAdapterSpec.js
@@ -61,8 +61,14 @@
break;
case "GET":
req.success({
- nodes: [{_id: 1}, {_id: 2}],
- edges: [{_id: "1-2", _from: 1, _to: 2}]
+ first: {_id: 1},
+ nodes: {
+ "1": {_id: 1},
+ "2": {_id: 2}
+ },
+ edges: {
+ "1-2": {_id: "1-2", _from: 1, _to: 2}
+ }
});
break;
default:
@@ -261,8 +267,14 @@
id = 1;
spyOn($, "ajax").andCallFake(function(req) {
req.success({
- nodes: [{_id: 1}, {_id: 2}],
- edges: [{_id: "1-2", _from: 1, _to: 2}]
+ first: {_id: 1},
+ nodes: {
+ "1": {_id: 1},
+ "2": {_id: 2}
+ },
+ edges: {
+ "1-2": {_id: "1-2", _from: 1, _to: 2}
+ }
});
});
var callback = function() {