0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Wonsuk Choi
8fbfc14d42
chore(examples,docs): replace deprecated 'prefetchQuery'/'fetchQuery' calls with 'query' (#11282) 2026-08-25 15:06:52 +09:00
Feranmi Adeniji
2faff25cbf
fix(examples): replace deprecated 'isServer' with 'environmentManager.isServer()' in remaining Next.js examples (#10860) 2026-06-02 13:52:50 +02:00
Hwang Taehwan
4e1a04b506
refactor(react-query-next-experimental): use isServer to determine server environment (#7536)
* docs: use isServer on ssr guides

* refactor: use isServer on nextjs examples

* refactor(react-query-next-experimental): use isServer instead of typeof window

* chore(docs): fix prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-08 19:37:05 +02:00
Dominik Dorfmeister
721730a6a9
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>
2024-05-27 20:13:24 +02:00