feat: allow to dehydrate and restore promises (#7481)
* feat: allow to dehydrate and restore promises * fix: retries with initialPromise, but without queryFn * fix: retries for infinite queries this could use some reconciliation * refactor: streamline the way we get the queryFn between Query and InfiniteQuery * fix: only dehydrate query.promise for pending queries * feat: allow setting hydration and dehydration defaultOptions on the QueryClient * test: global defaultOptions for hydrate / dehydrate * tests: hydration of promises * feat: next15 integration test * docs: app directory prefetching example * docs: global hydrate and dehydrate options * feat: use streaming * docs: prefetching * test: useQuery with initialPromise * fix: do not leak server errors to the client * docs: typo * fix: ignore next in sherif because we test against multiple versions of next * test: await promise before clearing client to avoid error * feat: always respect the `promise` passed to hydrate, even if we already have a cached entry. * Update docs/framework/react/guides/advanced-ssr.md Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com> * Update docs/framework/react/guides/advanced-ssr.md Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com> * chore: remove leftover 'use client' * oops * docs: better text * chore: better error messages * update note * chore: fix lock file --------- Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
D
Dominik Dorfmeister committed
721730a6a9bd3e0eed75672d9787f3a3accead7a
Parent: f8031f4
Committed by GitHub <noreply@github.com>
on 5/27/2024, 6:13:24 PM