Skip to content
Source
Sign inSign up
TanStack/query

[Solid-query] reconcile called multiple times on every request #8873

Opengrobitto(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

When I use reconcile in my solid-query, it gets called multiple times on every request. My reproducible example has 2 reconciles on every function call, but in my production code I got up to 4 reconciles on every query call

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-query-enmbz1vx?file=src%2FCounter.tsx,package.json

Steps to reproduce

Run stackblitz sample, look at the console - every query request triggers multiple reconciles, sometimes oldData === newData

Expected behavior

only one reconcile for every request

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

"@tanstack/solid-query": "^5.70.0", "solid-js": "^1.9.5"

Tanstack Query adapter

solid-query

TanStack Query version

5.70.0

TypeScript version

5.5.4

Additional context

No response

  1. birkskyum(GitHub profile, opens in a new tab) added labelspackage: solid-query

  2. Now it got even worse: I got values from different queries with different queryKeys mixed up in the same reconcile call.

    Reproducing 100% in my complex app, but can't create a simple example yet. Probably this issues are connected but if not please let me know I will invest some more time to reproduce this behavior in sandbox.

  3. Hi team, I noticed #8873 is still open and the earlier fix (#11255) was closed without merging. Would you be open to a fresh PR addressing this? Before putting one up, I wanted to check on the intended behavior: should structural sharing/reconciliation run strictly when the incoming data has actually changed, or is there an edge case where it needs to re-evaluate regardless? Happy to open a draft with tests if you'd like to revisit it.

Sign in to join this conversation.