@@ -113,7 +113,7 @@ export type UseInfiniteQueryMethod<Paths extends Record<string, Record<HttpMetho
113113 Response [ "data" ] ,
114114 Response [ "error" ] ,
115115 InferSelectReturnType < InfiniteData < Response [ "data" ] > , Options [ "select" ] > ,
116- QueryKey < Paths , Method , Path > ,
116+ readonly [ ... QueryKey < Paths , Method , Path > , "infinite" ] ,
117117 unknown
118118 > ,
119119 "queryKey" | "queryFn"
@@ -229,11 +229,10 @@ export default function createClient<Paths extends {}, Media extends MediaType =
229229 useInfiniteQuery : ( method , path , init , options , queryClient ) => {
230230 const { pageParamName = "cursor" , ...restOptions } = options ;
231231 const { queryKey } = queryOptions ( method , path , init ) ;
232- const infiniteQueryKey = [ ...queryKey , "infinite" ] as const ;
233232 return useInfiniteQuery (
234233 {
235- queryKey : infiniteQueryKey ,
236- queryFn : async ( { queryKey : [ method , path , init ] , pageParam = 0 , signal } ) => {
234+ queryKey : [ ... queryKey , "infinite" ] ,
235+ queryFn : async ( { pageParam = 0 , signal } ) => {
237236 const mth = method . toUpperCase ( ) as Uppercase < typeof method > ;
238237 const fn = client [ mth ] as ClientMethod < Paths , typeof method , Media > ;
239238 const mergedInit = {
0 commit comments