Add a react-query default mutation key without having to enable the requestOptions
setting
#1947
Labels
tanstack-query
TanStack Query related issue
This PR introduced default mutation keys for mutations based on the operation ID. This is a nice addition, but currently not usable in combination with the
requestOptions
configuration option. When settingrequestOptions
tofalse
in the config:No default mutation keys are generated. This is because the aforementioned PR only generates the mutation keys if this option is set to
true
(or left out entirely).I personally prefer to keep this option set to
false
because I don't need to override any options for the request itself and would rather stick close to to the react-query API for the hook options (i.e. being able to update the query options viauseQuery({ retry: false })
instead ofuseQuery({ query: { retry: false } })
), but I'd still like to get default mutation keys.I'm not sure if this is technically feasible since I'm sure there's a reason the keys are only generated if the
requestOptions
config isn'ttrue
(default).The text was updated successfully, but these errors were encountered: