Skip to content

Solid Query is failing to recognize signal change in onMount #7298

@PeterDraex

Description

@PeterDraex

Describe the bug

I'd like to load different query on the server and on the client, to speed up the initial page load.

I've tried doing that by including a isClient signal in the queryKey and setting it in onMount. However, the change in isClient signal is not picked up by Solid Query. With createResource, it seems to be working okay.

Your minimal, reproducible example

https://stackblitz.com/edit/github-pqy8j7-jw28rz?file=src%2Fcomponents%2FPage.tsx

Steps to reproduce

See that while the value of the signal is client, the query was resolved with signal value server:

resource: server
signal: client

Expected behavior

After hydration, this is displayed

resource: client
signal: client

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Windows, Chrome 123

Tanstack Query adapter

solid-query

TanStack Query version

5.30.3

TypeScript version

No response

Additional context

cc @ardeora

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions