Both useMutation and useBulkMutation may end up using cached query responses if the action doesn't change between mutations (e.g., the POST data remains the same). It seems wrong to me that mutations would be cached.
The query function has a skipCache flag that needs to be set on these two lines:
|
const queryResponse = await clientContext.query<T>({ ...action, signal: action.signal || signal }); |
|
const queryResponses: Array<QueryResponse<T>> = await Promise.all(actions.map(action => query<T>(action))); |
I'll submit a PR for this after I free up some time.
Both
useMutationanduseBulkMutationmay end up using cached query responses if the action doesn't change between mutations (e.g., the POST data remains the same). It seems wrong to me that mutations would be cached.The
queryfunction has askipCacheflag that needs to be set on these two lines:react-fetching-library/src/hooks/useMutation/useMutation.ts
Line 50 in 9b0abd8
react-fetching-library/src/hooks/useBulkMutation/useBulkMutation.ts
Line 66 in 9b0abd8
I'll submit a PR for this after I free up some time.