* docs(preact-query): warn about request waterfalls and point to 'useSuspenseQueries' in 'useSuspenseQuery'
* docs(preact-query): add multiple-parallel-queries example to 'useSuspenseQueries'
* fix(preact-query): guard 'fetchNextPage' example with 'isFetching', not just 'isFetchingNextPage'
* docs(preact-query): add global loading indicator example to 'useIsFetching'
* docs(preact-query): add mutation-state, 'Promise.all', and 'Promise.allSettled' examples to 'useMutation'
* docs(preact-query): add 'isPending'/'isError' example alongside 'status' to 'useQuery'
* docs(preact-query): fix dependent-query example in 'useQuery' to use 'isLoading' instead of 'isPending'
* docs(preact-query): add pagination example with 'keepPreviousData' to 'useQuery'
* docs(preact-query): correct consecutive-mutation callback wording in 'useMutation' example
* docs(preact-query): add per-call 'onError' callback to basic 'useMutation' example
* docs(preact-query): use contextual message in 'console.error' for 'Promise.all' example in 'useMutation'
* docs(preact-query): wrap bare 'QueryClient' type name in backticks in JSDoc
* docs(preact-query): backtick 'QueryClient' in 'children' prop doc and 'suspense'/'throwOnError' in QueryErrorResetBoundary
* docs(preact-query): document type parameters with '@template' and add 'useQueryClient' throws note
* docs(preact-query): fix TQueryData select direction and TResults/TDepth phrasing flagged by CodeRabbit
* docs(preact-query): document interfaces and type aliases with JSDoc for generated reference docs
* docs(preact-query): fix finite/infinite mix-ups and opaque-array fallback claims flagged by CodeRabbit
* docs(preact-query): document functions and components with JSDoc for generated reference docs
* docs(preact-query): replace concrete API calls with abstract fetcher names in JSDoc examples
* docs(preact-query): rename mutation example fetcher to be CRUD-neutral
* docs(preact-query): rename mutation example fetcher to 'createPosts'
* docs(preact-query): add examples for Suspense, prefetch, and options-builder functions
* docs(preact-query): add optimistic update, dependent query, and SSR hydration examples
* docs(preact-query): add parameterized factory and mutationKey lookup examples to queryOptions/mutationOptions
* docs(preact-query): add infiniteQueryOptions factory example and restore useMutationState's third example
* docs(preact-query): add TkDodo-inspired multi-API reuse, initialData, and per-call mutate callback examples
* docs(preact-query): document useIsRestoring, initialData, mutateAsync, and skipToken-excluded queryFn fields
* docs(preact-query): fill in empty Returns sections for hooks and options builders
* docs(preact-query): systematic sweep of generated pages for missing field descriptions and fix mismatched mutationOptions example
* docs(preact-query): split mutationOptions' mutationKey overload into basic usage and lookup examples
* docs(preact-query): fix overloads whose example didn't match their initialData-required type
* docs(preact-query): fill overloads missing examples and useSuspenseQueries' queryClient param description
* docs(preact-query): remove duplicated overload example and fix examples that failed type-checking
* docs(preact-query): describe every documented parameter and restore reverted overload example
* docs(preact-query): describe children props and low-level context exports
* fix(preact-query): remove inaccurate 'queryFn is optional' claim from infiniteQueryOptions overload
* docs(preact-query): add missing @returns to mutationOptions overloads and provider components
* docs(preact-query): describe QueryErrorResetBoundary children and its render-function parameter
* docs(preact-query): fix prose-accuracy issues found by multi-agent audit
Corrects useQuery's first overload @returns to match its actual return
type, moves the useSuspenseQuery/useSuspenseInfiniteQuery cancellation
caveat out of the @returns block, softens overstated skipToken/queryFn
claims, merges a duplicated useMutationState description, and adds
missing JSDoc to QueryErrorResetBoundary's function-type aliases and
UseMutateFunction/UseMutateAsyncFunction.
* docs(preact-query): soften remaining overstated queryFn requirement in Suspense options
* docs(preact-query): fix inaccurate prose in hydration, queryFn, and useQueries docs
* docs(preact-query): correct hydration freshness gate, placeholderData arity, and deprecated 'fetchInfiniteQuery' reference
* docs(preact-query): remove leftover 'data is never undefined' claim in 'useInfiniteQuery' overload docs
* docs(preact-query): replace deprecated 'prefetchQuery'/'prefetchInfiniteQuery' calls in examples with 'query'/'infiniteQuery'
* docs(preact-query): point 'usePrefetchQuery' JSDoc at 'queryClient.query' to match its actual option type
Ports #9338 to preact-query: ensurePreventErrorBoundaryRetry now
receives the cached query and evaluates a function-form throwOnError
against the actual error before setting retryOnMount = false, instead
of treating any function as truthy. Includes the regression tests
from #9338, two of which fail on current main.
Fixes#11165
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
* chore: tsup -> tsdown
* revert size-limit and fix the build instead
* fix angular and devtools build
* fix nextJs builds
* more solid related things
* fix: import order
* fix(types): propagate generic type params to useMutationState select callback
When TResult is a typed MutationState, the select callback parameter
now receives the correctly typed Mutation instead of the base Mutation type.
Adds a second type param TMutation (defaulting to MutationTypeFromResult<TResult>)
to MutationStateOptions across all five framework adapters. Uses a non-distributive
conditional type to avoid union expansion when TResult is unresolved.
Fixes#9825
* ci: apply automated fixes
* refactor(types): simplify useMutationState cast to mutation as TMutation
Replace the double-cast `(fn as unknown as (m: Mutation) => TResult)(m)`
with the direct `fn(m as TMutation)` across all five framework packages.
The constraint `TMutation extends Mutation<any, any, any, any>` creates
sufficient overlap for the single cast to compile cleanly on TS 5.4–6.0.
* fix(test): reorder imports in useMutationState.test-d.tsx per import/order rule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(svelte-query): eliminate duplicate MutationTypeFromResult definition
Export MutationTypeFromResult from types.ts so useMutationState.svelte.ts
can import it instead of redefining it. Also normalises the else branch to
plain Mutation, matching every other adapter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
* test({react,preact}-query/useInfiniteQuery): use the '.then()' convention consistently
* test({react,preact}-query/useMutation): use the '.then()' convention consistently
* test({react,preact}-query/useQueries): use the '.then()' convention consistently
* test({react,preact}-query/useQuery): use the '.then()' convention consistently
* test({react,preact}-query/usePrefetchQuery): inline the 'generateQueryFn' factory into each call site
* test({react,preact}-query/usePrefetchQuery): drop the unnecessary 'vi.fn()' wrapper on the never-asserted sentinel queryFn