From e843b73472e1ad46f2707c39ce55d64d1bed1bc0 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 20 Dec 2023 05:03:32 +0100 Subject: [PATCH] Fix mutations not resuming after reconnecting/relaunching --- front/apps/mobile/app/_layout.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/front/apps/mobile/app/_layout.tsx b/front/apps/mobile/app/_layout.tsx index ca8cda53..cce8a074 100644 --- a/front/apps/mobile/app/_layout.tsx +++ b/front/apps/mobile/app/_layout.tsx @@ -126,6 +126,10 @@ export default function Root() { // Only dehydrate mutations, queries are not json serializable anyways. dehydrateOptions: { shouldDehydrateQuery: () => false }, }} + onSuccess={async () => { + await queryClient.resumePausedMutations(); + queryClient.invalidateQueries(); + }} >