@@ -1699,6 +1699,7 @@ def create_graph(
16991699 replication_factor : Optional [int ] = None ,
17001700 write_concern : Optional [int ] = None ,
17011701 satellite_collections : Optional [Sequence [str ]] = None ,
1702+ sync : Optional [bool ] = None ,
17021703 ) -> Result [Graph ]:
17031704 """Create a new graph.
17041705
@@ -1753,6 +1754,8 @@ def create_graph(
17531754 element must be a string and a valid collection name. The
17541755 collection type cannot be modified later.
17551756 :type satellite_collections: [str] | None
1757+ :param sync: Wait until everything is synced to disk.
1758+ :type sync: bool | None
17561759 :return: Graph API wrapper.
17571760 :rtype: arango.graph.Graph
17581761 :raise arango.exceptions.GraphCreateError: If create fails.
@@ -1796,7 +1799,16 @@ def create_graph(
17961799 if satellite_collections is not None : # pragma: no cover
17971800 data ["options" ]["satellites" ] = satellite_collections
17981801
1799- request = Request (method = "post" , endpoint = "/_api/gharial" , data = data )
1802+ params : Params = {}
1803+ if sync is not None :
1804+ params ["waitForSync" ] = sync
1805+
1806+ request = Request (
1807+ method = "post" ,
1808+ endpoint = "/_api/gharial" ,
1809+ data = data ,
1810+ params = params ,
1811+ )
18001812
18011813 def response_handler (resp : Response ) -> Graph :
18021814 if resp .is_success :
0 commit comments