-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
Describe the bug
There's data and key mismatch with staleTime configured using Solid Query v5 (only v5, v4 works as expected). In another setup (not the reproduction), the mismatch always happens whether staleTime is set or not.
Your minimal, reproducible example
https://stackblitz.com/edit/solid-query-key-and-data-mismatch
Steps to reproduce
- Go to the StackBlitz reproduction
- Wait for the dependencies installation and server to start
- Initially the
selectoption set toOneand the fetching starts for the key['posts', '1'] - Change the
selectoption toTwoto fetch for['posts', '2']and the data below it will update - Switch to option
Onewith['posts', '1'], the data will change as expected - Switch back to option
Twowith['posts', '2']but it will keep showing data for key['posts', '1']⚠️
Expected behavior
Switching between the two keys should return the data corresponding to each key.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Brave (Chromium-based)
- Version: Brave
v1.52.130Chromiumv114.0.5735.198
Tanstack Query adapter
solid-query
TanStack Query version
v5.0.0-alpha.85
TypeScript version
v5.1.3
Additional context
No response