You can use the schema manager to perform CRUD actions on named graphs.
The schema manager supports the following graph functions:
$arangoClient->schema()->createGraph(
'relations',
[
'edgeDefinitions' => [
[
'collection' => 'children',
'from' => ['characters'],
'to' => ['characters']
]
],
'orphanCollections' => [
'orphanVertices'
],
],
true
);
$arangoClient->schema()->getGraphs('relations');
$arangoClient->schema()->getGraphs();
$arangoClient->schema()->hasGraph('relations');
$arangoClient->schema()->deleteGraph('locations');
$arangoClient->schema()->getGraphVertices('relations');
$arangoClient->schema()->addGraphVertex('relations', 'houses');
$arangoClient->schema()->removeGraphVertex('relations', 'houses', true);
$arangoClient->schema()->deleteGraph('locations');
$arangoClient->schema()->addGraphEdge(
'relations',
[
'collection' => 'vassals',
'from' => ['characters'],
'to' => ['houses']
]
);
replaceGraphEdge(string $name, string $edge, array $edgeDefinition, bool $dropCollection = false, bool $waitForSync = false): stdClass
$arangoClient->schema()->createGraph(
'relations',
[
'edgeDefinitions' => [
[
'collection' => 'children',
'from' => ['characters'],
'to' => ['characters']
]
]
]
);
removeGraphEdge(string $name, string $edge, bool $dropCollection = true, bool $waitForSync = false): stdClass
$arangoClient->schema()->removeGraphEdge(
'relations',
'children',
true,
true
);