[pull] main from TanStack:main#451
Merged
pull[bot] merged 6 commits intomanudeli:mainfrom Apr 25, 2026
Merged
Conversation
* fix: preserve infinite query behavior during SSR hydration (#8825) * chore: add changeset for #8825 * refactor: apply review feedback - Remove isRejectedThenable check - Inline behavior assignment * refactor: remove unnecessary `any` type assertions * refactor: store query type in Query instead of injecting behavior - Add a type field to Query, set from the _type marker - In Query.fetch(), apply infiniteQueryBehavior automatically when type === 'infiniteQuery' - Remove direct behavior injection from infiniteQueryObserver, fetchInfiniteQuery, ensureInfiniteQueryData, and hydrate() - In hydrate(), pass the _type marker instead of behavior to fix a regression where user-provided hydrate defaultOptions.queries.behavior could be overwritten - Add regression tests for the SSR -> dehydrate -> hydrate -> refetch flow * ci: apply automated fixes * ref: use optional type: 'infinite' everywhere * fix: don't send full queries into queryClient methods * fix: let's stick with queryType as the public name * fix: test -> it --------- Co-authored-by: kimchosule <kimchosule1@bizbee.co.kr> Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix(query-core): stop wrapping persister generics in NoInfer The `persister` field on QueryOptions was typed as `QueryPersister<NoInfer<TQueryFnData>, NoInfer<TQueryKey>, NoInfer<TPageParam>>` so persister could not contribute to TQueryFnData inference. When the companion queryFn declared a parameter (e.g. `(_context) => 'test'`), TypeScript failed to infer TQueryFnData from its return and defaulted to `unknown`, causing a spurious overload mismatch against a concretely-typed persister (fixes #7842). Removing the NoInfer wrappers lets persister participate in inference. Genuine type conflicts between persister and queryFn still surface as errors (covered by a new negative type test in queryOptions.test-d.tsx). Co-Authored-By: Claude <noreply@anthropic.com> * test(react-query): wrap negative type tests in assertType Addresses CodeRabbit nitpick: vitest/expect-expect flagged the genuine-conflict test as having no assertions. Wrap both calls in assertType() so the linter sees an explicit assertion while the `@ts-expect-error` directives continue to enforce the type mismatch. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
ci: changeset release Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* useSuspenseQueries combine * useSuspenseQueries combine * ci: apply automated fixes * fix: stale data * ci: apply automated fixes (attempt 3/3) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
ci: changeset release Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )