Skip to content
Source
Sign inSign up
TanStack/query

Solid query 5: `enabled` option is not being tracked in SSR #6256

Send to my agent
Closedshiro(GitHub profile, opens in a new tab) opened this issue 4 comments

Describe the bug

The enabled flag is not working with solid query and Solid Start's SSR.

See my repro for actual example: github repro

Your minimal, reproducible example

https://github.com/shiro/repro-SS-solid-query-enabled-flag

Steps to reproduce

  • use solid start with SSR and latest solid query
  • use solid start's stream or async SSR modes
  • add a simple query, connect the enabled option to a signal that's initially set to false
  • toggle the signal on the client side
  • query does not run

Expected behavior

Query should run once enabled is set to true.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: linux
  • browser: chromium, FF

Tanstack Query adapter

solid-query

TanStack Query version

5.2.1

TypeScript version

4.9.5

Additional context

No response

  1. shiro(GitHub profile, opens in a new tab) changed the title

  2. Thank you for creating this issue. Sadly this seems like a solid-start bug. I have already filed an issue on the solid-start repo to start the conversation there

    Please see: https://github.com/solidjs/solid-start/issues/1099

  3. ardeora(GitHub profile, opens in a new tab) added labelsupstream

  4. @shiro https://stackblitz.com/github/ardeora/solid-start-query-working-old Here is an older version of Solid Start that should work as expected for you. Seems like the issue is in newer versions of solid-start

  5. Thank you so much, that was quick!

    Will close this for now since its not a query issue.

  6. @shiro Ryan was very kind to fix this issue in solid-js. If you use v1.8.5 then it works great!

    Here's your repro with the latest versions https://stackblitz.com/edit/github-pejqcl?file=package.json

Sign in to join this conversation.