Open severinh opened 2 months ago
Actually, this bug is related to https://github.com/anymaniax/orval/issues/1434:
Most likely, the fix to properly support abort signals for POST queries will close both of these issues.
@severinh any help or PR would be appreciated!
What are the steps to reproduce this issue?
client: 'react-query'
, and using Orval 0.30.X+orval.config.ts
, setoverride.operations.project_aggregation_query.query.useQuery
totrue
.useProjectAggregationQueryQueryOptions
now passes asignal
parameter toprojectAggregationQuery
, butprojectAggregationQuery
does not actually accept asignal
parameter.What happens?
The code generated by Orval does not compile.
useProjectAggregationQueryQueryOptions
now passes asignal
parameter toprojectAggregationQuery
, butprojectAggregationQuery
does not actually accept asignal
parameter.What were you expecting to happen?
The generated
projectAggregationQuery
should have a signal parameter.Any logs, error output, etc?
N/A
Any other comments?
This is a new regression. It did not happen in 0.29.x. In 0.29.x, neither
projectAggregationQuery
also did not have a signal parameter, but alsouseProjectAggregationQueryQueryOptions
did not pass one.Here's our orval.config.ts:
We found a work-around: We now pass
signal: false
to the override. This restores the behavior in 0.29.x, and lets the code compile successfully. However, it's not ideal. This means that this query cannot be aborted properly by react-query.What versions are you using?
Operating System: MacOS (but bug is independent from it) Package Version: 0.30.2 Browser Version: N/A