diff --git a/Documentation/Examples/api-graph-create-graph b/Documentation/Examples/api-graph-create-graph index 72c51c4936..4f7b0b3bcd 100644 --- a/Documentation/Examples/api-graph-create-graph +++ b/Documentation/Examples/api-graph-create-graph @@ -1,5 +1,5 @@ > curl --data @- -X POST --dump - http://localhost:8529/_api/graph -{"_name" : "graph1", "vertices" : "v", "edges" : "e"} +{"_key" : "graph1", "vertices" : "v", "edges" : "e"} HTTP/1.1 200 OK content-type: application/json; charset=utf-8 @@ -9,8 +9,8 @@ content-type: application/json; charset=utf-8 "_id": "_graphs/graph1", "_rev": 11767958, "_key": "graph1", - "vertices": 9670806, - "edges": 10588310 + "vertices": "v", + "edges": "e" }, "error": false, "code": 200 diff --git a/Documentation/Examples/api-graph-get-graph b/Documentation/Examples/api-graph-get-graph index 82218060a9..dc25e1003a 100644 --- a/Documentation/Examples/api-graph-get-graph +++ b/Documentation/Examples/api-graph-get-graph @@ -8,8 +8,8 @@ content-type: application/json; charset=utf-8 "_id": "_graphs/graph1", "_rev": 11767958, "_key": "graph1", - "vertices": 9670806, - "edges": 10588310 + "vertices": "v", + "edges": "e" }, "error": false, "code": 200 diff --git a/Documentation/Makefile.files b/Documentation/Makefile.files index a250366953..c8e0415e9a 100644 --- a/Documentation/Makefile.files +++ b/Documentation/Makefile.files @@ -65,6 +65,7 @@ WIKI = \ HttpBlueprints \ HttpCollection \ HttpCursor \ + HttpGraph \ HttpImport \ HttpIndex \ HttpInterface \ diff --git a/js/common/modules/org/arangodb/graph.js b/js/common/modules/org/arangodb/graph.js index 3ae6b70f76..0e38a5c816 100644 --- a/js/common/modules/org/arangodb/graph.js +++ b/js/common/modules/org/arangodb/graph.js @@ -1175,19 +1175,19 @@ function Graph(name, vertices, edges) { // check if know that graph graphProperties = gdb.firstExample('vertices', - vertices._id, + vertices.name(), 'edges', - edges._id + edges.name() ); if (graphProperties === null) { // check if edge is used in a graph - graphProperties = gdb.firstExample('edges', edges._id); + graphProperties = gdb.firstExample('edges', edges.name()); if (graphProperties === null) { - graphPropertiesId = gdb.save({ 'vertices' : vertices._id, - 'edges' : edges._id, + graphPropertiesId = gdb.save({ 'vertices' : vertices.name(), + 'edges' : edges.name(), '_key' : name }); graphProperties = gdb.document(graphPropertiesId); @@ -1198,11 +1198,11 @@ function Graph(name, vertices, edges) { throw "found graph but has different "; } } else { - if (graphProperties.vertices !== vertices._id) { + if (graphProperties.vertices !== vertices.name()) { throw "found graph but has different "; } - if (graphProperties.edges !== edges._id) { + if (graphProperties.edges !== edges.name()) { throw "found graph but has different "; } }