You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{mutate: create}=useDocumentsControllerCreate({});// -- snipcreate({headers: {// 1. Headers set here will overwrite any headers set by the context'Content-Type': 'multipart/form-data',},});
This results in the context headers being overwritten (and any other fetcherOptions)
Ie. my mutation is sent without Authorisation header
Desired behaviour
The fetcherOptions should be merged with the mutation variables, this can be achieved with lodash merge or something similar
The components file generates react query mutations like this
Current Behaviour
With this Context
And using a mutation somewhere
This results in the context headers being overwritten (and any other fetcherOptions)
Ie. my mutation is sent without Authorisation header
Desired behaviour
The
fetcherOptions
should be merged with the mutation variables, this can be achieved with lodash merge or something similarDesired change in generated code
The text was updated successfully, but these errors were encountered: