Arbaaz123676 commented on code in PR #62798:
URL: https://github.com/apache/airflow/pull/62798#discussion_r2908722631


##########
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:
##########
@@ -113,13 +114,25 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode, 
onClose, runId, taskId, xcom
         type: "error",
       });
     },
-    onSuccess: async () => {
+    onSuccess: async (response) => {
+      queryClient.setQueryData(
+        [
+          useXcomServiceGetXcomEntryKey,
+          {
+            dagId,
+            dagRunId: runId,
+            deserialize: true,
+            mapIndex,
+            stringify: false,
+            taskId,
+            xcomKey,
+          },
+        ],
+        response,
+      );

Review Comment:
   This updates the Query cache for a Airflow XCom entry using the API response 
after a successful request, so the UI updates immediately without refetching 
from the server.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to