solid-query v6: useQueries doesn't attach to the new hydration channel from #11168
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Inizia da packages/solid-query/src/useQueries.ts e dalle modifiche al canale di hydration di #11168, confrontando useQueries con il percorso di priming descritto per useBaseQuery. Esegui il fixture SSR/hydration hydration.test.tsx; il lavoro è completato quando useQueries si coordina con il canale gestito dal provider senza attivare un refetch al mount mentre i dati trasmessi vengono preparati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
#11168 (merged today on solid-query-v6-pre, targeting @tanstack/[email protected]) adds a provider-owned hydration channel so QueryClientProvider primes the cache from the server-dehydrated stream and useBaseQuery waits for its own entry to be primed (whenQueryPrimed) before attaching its observer, instead of doing a mount refetch on data that's about to arrive.
useQueries doesn't go through any of that. I read the current packages/solid-query/src/useQueries.ts on solid-query-v6-pre: it builds its own QueriesObserver directly —
const observer = untrack(
() => new QueriesObserver<TCombinedResult>(client(), defaultedQueries(), ...),
)
...
createEffect(() => {
if (!isRestoring()) {
unsubscribe = observer.subscribe((result) => { ... })
}
})
— with no reference to hydrationChannel, whenQueryPrimed, or the executorRan replay-detection flag useBaseQuery added (confirmed with rg "whenQueryPrimed|executorRan|hydrat" over the file: zero matches). The observer is constructed and its optimistic result read synchronously on mount, so if this runs before the provider's channel has applied hydrate() for these query keys, useQueries sees a cold cache and behaves exactly like the pre-#11168 useBaseQuery did: no priming coordination, so a query whose data is already in flight from the SSR stream can still trigger a mount refetch even though it's well within staleTime.
This isn't a guess — the PR body says so explicitly under "Coexistence with TanStack Start": "useQueries does not go through this path (it did not serialize hydration data before either); with the channel in place its queries would be primed too as soon as they settle on the server — client attach for it could be covered in a follow-up."
Since this is still pre-release (solid-query-v6-pre, not yet on main), flagging it now while the hydration channel work is fresh in mind seems more useful than after the branch merges and beta ships. Happy to help verify a fix against the same hydration.test.tsx SSR/hydration fixture #11168 added if that's useful.
- Lingua principale
- TypeScript
- Stelle
- 50.4k
- Fork
- 4.2k
- Merge medio
- 7h 37m
- PR unite (30g)
- 420
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/query
-
QueryClient.isFetching and useIsFetching accept a fetchStatus filter and ignore itForse già presa @Apu-Emdad l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Export MutationResult typeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TanStack/query#11930 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Forse di nuovo libera @LeonxLJX l’ha presa 39 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TanStack/query#11358 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
solid-query: switching the queryClient accessor strands the new client's cache (subscription stays on the old observer)Forse già presa @MaNaN1803 l’ha presa 82 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TanStack/query#11106 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
restoreQueries and persisterGc throw on malformed persisted entriesForse già presa @VGontier-cmd l’ha presa 7 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TanStack/query
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
apache/rocketmq-dashboard#6610 ·
I maintainer di solito rispondono entro 3 giorni
-
nextjs-tracking
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
cloudflare/vinext#3920 ·
I maintainer di solito rispondono entro 1 giorno
-
Team:Dashboards
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
elastic/kibana#297299 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
analytics beginner friendly community contributions-welcome good first issue hacktoberfest help wanted up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
affected/v17 affected/v18 area/frontend type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
umbraco/Umbraco-CMS#24186 ·
I maintainer di solito rispondono entro 2 giorni