@@ -20,7 +20,7 @@ def to_received(self, work_id: str, message: str):
2020 }
2121 }
2222 """
23- self .api .query (query , {"id" : work_id , "message" : message })
23+ self .api .query (query , {"id" : work_id , "message" : message }, True )
2424
2525 def to_processed (self , work_id : str , message : str , in_error : bool = False ):
2626 if self .api .bundle_send_to_queue :
@@ -35,7 +35,7 @@ def to_processed(self, work_id: str, message: str, in_error: bool = False):
3535 }
3636 """
3737 self .api .query (
38- query , {"id" : work_id , "message" : message , "inError" : in_error }
38+ query , {"id" : work_id , "message" : message , "inError" : in_error }, True
3939 )
4040
4141 def ping (self , work_id : str ):
@@ -60,7 +60,7 @@ def report_expectation(self, work_id: str, error):
6060 }
6161 """
6262 try :
63- self .api .query (query , {"id" : work_id , "error" : error })
63+ self .api .query (query , {"id" : work_id , "error" : error }, True )
6464 except :
6565 self .api .app_logger .error ("Cannot report expectation" )
6666
@@ -78,7 +78,9 @@ def add_expectations(self, work_id: str, expectations: int):
7878 }
7979 """
8080 try :
81- self .api .query (query , {"id" : work_id , "expectations" : expectations })
81+ self .api .query (
82+ query , {"id" : work_id , "expectations" : expectations }, True
83+ )
8284 except :
8385 self .api .app_logger .error ("Cannot report expectation" )
8486
@@ -96,7 +98,9 @@ def add_draft_context(self, work_id: str, draft_context: str):
9698 }
9799 """
98100 try :
99- self .api .query (query , {"id" : work_id , "draftContext" : draft_context })
101+ self .api .query (
102+ query , {"id" : work_id , "draftContext" : draft_context }, True
103+ )
100104 except :
101105 self .api .app_logger .error ("Cannot report draft context" )
102106
@@ -111,7 +115,9 @@ def initiate_work(self, connector_id: str, friendly_name: str) -> str:
111115 }
112116 """
113117 work = self .api .query (
114- query , {"connectorId" : connector_id , "friendlyName" : friendly_name }
118+ query ,
119+ {"connectorId" : connector_id , "friendlyName" : friendly_name },
120+ True ,
115121 )
116122 return work ["data" ]["workAdd" ]["id" ]
117123
@@ -122,10 +128,7 @@ def delete_work(self, work_id: str):
122128 delete
123129 }
124130 }"""
125- work = self .api .query (
126- query ,
127- {"workId" : work_id },
128- )
131+ work = self .api .query (query , {"workId" : work_id }, True )
129132 return work ["data" ]
130133
131134 def wait_for_work_to_finish (self , work_id : str ):
@@ -179,10 +182,7 @@ def get_work(self, work_id: str) -> Dict:
179182 }
180183 }
181184 """
182- result = self .api .query (
183- query ,
184- {"id" : work_id },
185- )
185+ result = self .api .query (query , {"id" : work_id }, True )
186186 return result ["data" ]["work" ]
187187
188188 def get_connector_works (self , connector_id : str ) -> List [Dict ]:
@@ -243,6 +243,7 @@ def get_connector_works(self, connector_id: str) -> List[Dict]:
243243 "filterGroups" : [],
244244 },
245245 },
246+ True ,
246247 )
247248 result = result ["data" ]["works" ]["edges" ]
248249 return_value = []
0 commit comments