TanStack / TanStack/query

Solid Query v6 loses derived updates when mounting with warm stale cache

Open
#11,384 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
50.3k
Forks
4.2k
Avg merge
18h 25m
Merged PRs (30d)
200

Description

Describe the bug

In 6.0.0-rc.1+, mounting a consumer for a warm, stale query starts an immediate refetch.

query.data contains the item, but an effect-derived signal remains empty. rc.0 passes; the repro does not use Router.

Your minimal, reproducible example

https://stackblitz.com/~/github.com/2wheeh/solid-query-cached-mount-repro

Steps to reproduce
  1. Wait until query.data shows Example item.
  2. Click Mount.
  3. Observe that query.data contains the item while Mounted consumer output is [].
Expected behavior

Mounted consumer output should contain the same item as query.data.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Reproduces on macOS and StackBlitz WebContainers; appears to be platform-neutral.

Tanstack Query adapter

solid-query

TanStack Query version

v6.0.0-rc.2

TypeScript version

5.9.2

Additional context

https://github.com/2wheeh/solid-query-cached-mount-repro/blob/main/README.md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproduction and its README, focusing on mounting a consumer for a warm, stale query in solid-query v6.0.0-rc.2 and comparing the behavior with rc.0. Reproduce the Mount sequence and trace why the effect-derived signal stays empty during the immediate refetch; done means Mounted consumer output contains the same item as query.data.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.