@eintrek/erp-shell 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +13 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1361,8 +1361,19 @@ const getQueryClientConfig = () => ({
|
|
|
1361
1361
|
refetchOnWindowFocus: true,
|
|
1362
1362
|
},
|
|
1363
1363
|
mutations: {
|
|
1364
|
-
retry
|
|
1365
|
-
|
|
1364
|
+
// NEVER auto-retry a mutation. Unlike a query, a mutation is a side
|
|
1365
|
+
// effect on a non-idempotent endpoint (submit, create, approve), and
|
|
1366
|
+
// React Query cannot tell "the network dropped" from "the server
|
|
1367
|
+
// rejected this on business grounds".
|
|
1368
|
+
//
|
|
1369
|
+
// With retry: 1 every failed mutation fired twice. Two visible
|
|
1370
|
+
// consequences: a rejected submit showed up as two failed POSTs in the
|
|
1371
|
+
// network tab, and — far worse — a create whose response was lost in
|
|
1372
|
+
// flight would be re-sent and duplicate the record server-side.
|
|
1373
|
+
//
|
|
1374
|
+
// Retrying is the caller's decision, not a global default: the user
|
|
1375
|
+
// sees the error and presses the button again.
|
|
1376
|
+
retry: 0,
|
|
1366
1377
|
},
|
|
1367
1378
|
},
|
|
1368
1379
|
queryCache: new reactQuery.QueryCache({
|