@@ -1699,6 +1699,7 @@ def create_graph(
1699
1699
replication_factor : Optional [int ] = None ,
1700
1700
write_concern : Optional [int ] = None ,
1701
1701
satellite_collections : Optional [Sequence [str ]] = None ,
1702
+ sync : Optional [bool ] = None ,
1702
1703
) -> Result [Graph ]:
1703
1704
"""Create a new graph.
1704
1705
@@ -1753,6 +1754,8 @@ def create_graph(
1753
1754
element must be a string and a valid collection name. The
1754
1755
collection type cannot be modified later.
1755
1756
:type satellite_collections: [str] | None
1757
+ :param sync: Wait until everything is synced to disk.
1758
+ :type sync: bool | None
1756
1759
:return: Graph API wrapper.
1757
1760
:rtype: arango.graph.Graph
1758
1761
:raise arango.exceptions.GraphCreateError: If create fails.
@@ -1796,7 +1799,16 @@ def create_graph(
1796
1799
if satellite_collections is not None : # pragma: no cover
1797
1800
data ["options" ]["satellites" ] = satellite_collections
1798
1801
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
+ )
1800
1812
1801
1813
def response_handler (resp : Response ) -> Graph :
1802
1814
if resp .is_success :
0 commit comments