Describe the bug
streamedQuery does not work with useInfiniteQuery.
streamedQuery returns QueryFunction<Array<TQueryFnData>, TQueryKey>, but useInfinitQuery expects a queryFn with type QueryFunction<TQueryFnData, TQueryKey, TPageParam> | SkipToken
If this is by design, or there is some logical reason why this shouldn't be possible feel free to convert it to a discussion
Steps to reproduce
const query = useInfiniteQuery({
queryKey: ['data'],
queryFn: streamedQuery({
queryFn: fetchDataInChunks,
}),
})
Expected behavior
I would expect to useInfiniteQuery, and new data from a streamed query is automatically added to the last page of results that useInfiniteQuery returns.
Tanstack Query adapter
react-query
TanStack Query version
v5.69.0
Describe the bug
streamedQuerydoes not work withuseInfiniteQuery.streamedQueryreturnsQueryFunction<Array<TQueryFnData>, TQueryKey>, butuseInfinitQueryexpects aqueryFnwith typeQueryFunction<TQueryFnData, TQueryKey, TPageParam> | SkipTokenIf this is by design, or there is some logical reason why this shouldn't be possible feel free to convert it to a discussion
Steps to reproduce
Expected behavior
I would expect to
useInfiniteQuery, and new data from a streamed query is automatically added to the last page of results thatuseInfiniteQueryreturns.Tanstack Query adapter
react-query
TanStack Query version
v5.69.0