What are the steps to reproduce this issue?
- Generate the Overal
React Query Mutation hook
What happens?
It correctly generated the mutation hook:
export const usePostCompartmentidOpen = <
TError = ErrorType<NotFoundResponse | InternalServerErrorResponse | BadGatewayResponse>,
TContext = unknown,
>(options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof postCompartmentidOpen>>,
TError,
{ compartmentId: string },
TContext
>
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?
None
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
What are the steps to reproduce this issue?
React QueryMutation 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?: StatisticsThen 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?
None
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