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
I'm trying to use React Query as client with fetch as the mutator instead of Axios.
However, I encountered a problem while trying to do so. The generated hooks have a TypeScript error: Argument of type { url: string; method: string; } is not assignable to parameter of type string
So the function createNewTodo expecting url and method as object in the 1st argument but we only pass url because method is already part of the 2nd argument options. can you advise how to fix it?
The text was updated successfully, but these errors were encountered:
I'm trying to use
React Query
as client withfetch
as the mutator instead of Axios.However, I encountered a problem while trying to do so. The generated hooks have a TypeScript error:
Argument of type { url: string; method: string; } is not assignable to parameter of type string
Using this fetch custom mutator: https://github.com/anymaniax/orval/blob/master/samples/next-app-with-fetch/custom-fetch.ts#L16-L29
Orval output config:
The generated code with the above error:
So the function
createNewTodo
expecting url and method as object in the 1st argument but we only pass url because method is already part of the 2nd argument options. can you advise how to fix it?The text was updated successfully, but these errors were encountered: