React Query: Support passing query.meta
/ mutation.meta
options to axios instance
#1317
Labels
query.meta
/ mutation.meta
options to axios instance
#1317
In react-query, you can pass additional options to
queryFn
by settingmeta
options. In functions generated by orval, it would look like this:What were you expecting to happen?
I'd like to pass extra/meta options to axios instance itself and I expected that functions generated by orval will automatically pass any extra options (or options.meta) to
queryFn
and therefore to (custom) axios instance like this:But instead, the options are not passed to axios instance, only
url
,method
andsignal
(+ and possibly params + request data if it's POST/PATCH/PUT request).Am I missing something because in the docs about "Custom Axios Instance" in the code example the custom instance has parameters "config" and "options": https://orval.dev/guides/custom-axios
It doesn't have to be necessarily react-query's meta options that we pass to custom axios instance. Any way to pass extra data to axios instance (out-of-the-box) would be really nice.
What versions are you using?
Operating System: OSX, macOS Sonoma 14.4.1
Package Version: 6.25.0
Browser Version: Chrome Version 123.0.6312.87
The text was updated successfully, but these errors were encountered: