How to use path parameters on useMutation
?
#2009
Replies: 3 comments
-
I think this may be an issue with the library in general—we have some type issues with the library currently that we’re working through. Will investigate fixing this. |
Beta Was this translation helpful? Give feedback.
-
Seems like the params need to be included in the mutate payload next to the body;
Would be nice if it was included in the |
Beta Was this translation helpful? Give feedback.
-
There is no option object you can pass like in useQuery. So there is currently no option to pass path parameters when using useMutation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am able to query using path params but I am not able to do so using useMutations? Is this a limitation? Or am I doing it wrong?
* Notice the red squiggly at the end of the last example on parameter
a
.I have added the following to
tsconfig
:I get the following error when forcing a build:
However, if I just mouse hover, I get some sort of indication that tenantId is part of the parameter based on the following tip:

If I type something I get the following error:

Then I tried a couple of variations and none worked :(

I am not seeing anything different from my
get
vsdelete
json openapi schema.There also seems nothing suspicious in the generated
d.ts
file.Beta Was this translation helpful? Give feedback.
All reactions