ArangoDB-Community / pyArango

Python Driver for ArangoDB with built-in validation
https://pyarango.readthedocs.io/en/latest/
Apache License 2.0
238 stars 90 forks source link

Graphs can't be created with a custom name #137

Open andrepbento opened 5 years ago

andrepbento commented 5 years ago

Hi @tariqdaouda and @dothebart. I was working with your driver/library, however i can't create a new graph with a custom name. Every time i create a new graph, it assumes the name of the class that inherits from Graph: ... class GraphExample(Graph) ... graph = self._db.createGraph('GraphExample')

I don't know if it is to be normal this way, however if it isn't, and to extend this functionality, i would suggest to change the signature of the method 'createGraph' [from database.py] to receive a custom name:

def createGraph(self, className, graphName, createCollections=True, ... ... payload = { "name": graphName, ... }

Best regards, A. Bento.

tariqdaouda commented 5 years ago

Hi @andrepbento

This is the expected behaviour, but thank you for the suggestion!