Commit 2e7a08c
committed
fix(query): honor per-operation useMutation override for GET operations
A per-operation `override.operations.<id>.query.useMutation: true` was
silently discarded for GET operations: the operation stayed a Query
hook instead of becoming a Mutation hook. This was the inverse
asymmetry of the per-operation `useQuery: true` path, which already
worked for non-GET verbs.
`effectiveUseMutation` already encodes the per-verb default
(`verb !== Verbs.GET`), so the extra `&& verb !== Verbs.GET` gate on
`isMutation` only ever suppressed an explicit opt-in. Drop the gate so
`isMutation` honors explicit intent for every verb, mirroring how
`isQuery` honors `useQuery: true` for non-GET verbs.
Closes #33581 parent e3b888e commit 2e7a08c
24 files changed
Lines changed: 1326 additions & 6 deletions
File tree
- docs/content/docs/reference/configuration
- packages/query/src
- tests
- __snapshots__/react-query/per-operation-use-mutation-on-get
- model
- configs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
701 | 710 | | |
702 | 711 | | |
703 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
837 | 842 | | |
838 | 843 | | |
839 | 844 | | |
| |||
0 commit comments