@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.esm.js
CHANGED
|
@@ -1342,8 +1342,19 @@ const getQueryClientConfig = () => ({
|
|
|
1342
1342
|
refetchOnWindowFocus: true,
|
|
1343
1343
|
},
|
|
1344
1344
|
mutations: {
|
|
1345
|
-
retry
|
|
1346
|
-
|
|
1345
|
+
// NEVER auto-retry a mutation. Unlike a query, a mutation is a side
|
|
1346
|
+
// effect on a non-idempotent endpoint (submit, create, approve), and
|
|
1347
|
+
// React Query cannot tell "the network dropped" from "the server
|
|
1348
|
+
// rejected this on business grounds".
|
|
1349
|
+
//
|
|
1350
|
+
// With retry: 1 every failed mutation fired twice. Two visible
|
|
1351
|
+
// consequences: a rejected submit showed up as two failed POSTs in the
|
|
1352
|
+
// network tab, and — far worse — a create whose response was lost in
|
|
1353
|
+
// flight would be re-sent and duplicate the record server-side.
|
|
1354
|
+
//
|
|
1355
|
+
// Retrying is the caller's decision, not a global default: the user
|
|
1356
|
+
// sees the error and presses the button again.
|
|
1357
|
+
retry: 0,
|
|
1347
1358
|
},
|
|
1348
1359
|
},
|
|
1349
1360
|
queryCache: new QueryCache({
|