We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.3.1
useInfiniteQuery does not infer the type from the select option the same way useQuery does. See #2105.
useInfiniteQuery
select
useQuery
$api.useInfiniteQuery( 'post', '/api/v1/events', {}, { select: (data) => data.pages.flatMap((page) => page.data), } )
Produces this error:
Type '(data: InfiniteData<{ data: { id: string }[]; }, unknown>) => { ...; }[]' is not assignable to type '(data: InfiniteData<{ data: { id: string; }[]; }, unknown>) => InfiniteData<...>'.
The select type should infer the type for data exactly as useQuery would.
data
The text was updated successfully, but these errors were encountered:
No branches or pull requests
openapi-react-query version
0.3.1
Description
useInfiniteQuery
does not infer the type from theselect
option the same wayuseQuery
does. See #2105.Reproduction
Produces this error:
Expected result
The select type should infer the type for
data
exactly asuseQuery
would.Extra
The text was updated successfully, but these errors were encountered: