eyalll
eyalll15mo ago

Default Query Function to resume paused mutations

I'm building a React Native App with an offline mode. I implemented a PersistQueryProvider and a built my own createMMKVStoragePersister. When the app gets back online it fails to resume paused mutations because at that point functions does not exist. Any advice on providing the default query fucntions since they already exist from the trpcClient?
4 Replies
Nick
Nick15mo ago
This might be more of a React Query question honestly Do their docs say anything about this?
eyalll
eyalll15mo ago
They say that you should provide Default Query Function for those mutations which is more straight forward if you are using "vanilla" react query. But I thought that it could be a way to provide all the query functions (at least the mutations) that trpc makes for react query
Nick
Nick15mo ago
Hm, this might be worth putting together a minimal example and opening a github issue 🙂
eyalll
eyalll15mo ago
Sounds good!