Replies: 1 comment
-
Converted to a discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What are the steps to reproduce this issue?
React Query
Mutation hookWhat happens?
It correctly generated the mutation hook:
What were you expecting to happen?
I can not find a way to pass more input variables on the mutation itself when we auto generate. I looked in the documentation, also nothing in the Orval configuration.
What we currently have, in the non auto generated app, is the following:
mutationOpen.mutate({ compartmentId, statistics })
where statistics is typed like
statistics?: Statistics
Then in the result we have:
onSuccess(_, { compartmentId, statistics }) {
The reason is that we pass more context to the mutation which we use for analytics and loggings. Since we take these from the success/error handler. Does the Orval generation foresee something like this?
Any logs, error output, etc?
All works as expected, but i simply can not find a way
Any other comments?
I tried playing with the
TContext
option.What versions are you using?
Latest RQ and latest Orval. Its not a bug but im trying to understand if its intended to create the shared hook like this
Beta Was this translation helpful? Give feedback.
All reactions