Replies: 2 comments 1 reply
-
There is no way to pass in additional data like that at the moment. How are you getting the action and which type does it have? Can you create a TypeScript playground oder a CodeSandbox? |
Beta Was this translation helpful? Give feedback.
-
Yup, here is something similar to my use case: https://codesandbox.io/s/recursing-pascal-ne9bxl Using the code gen tool to generate hooks and types (api.generated.ts), so basically just want to be able to extend the mutation trigger definition so that TS does not complain for the extra parameter but also keep the correct type that we need to send to the server. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was wondering how to add some more information when I trigger a mutation.
We are using the code generation tool with the hooks feature enabled so our use case is something like this:
Currently adding this additional object works and I can see the meta object in the action.meta.arg. originalArgs field but the problem is that TS does not recognise this additional object so I am getting a type error.
Any suggestions how to work around this?
Beta Was this translation helpful? Give feedback.
All reactions