Skip to content
Source
Sign inSign up
TanStack/query

[solid-query v5] Solid Start dependent query from context throws error (missing `defaultQueryOptions`) #6102

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

Describe the bug

Hey! I'm using Solid Start with the Cloudflare Pages adapter, ssr: false and solid-query v5-rc.4.

I've noticed that when I provide a query via context within a layout to my routes and use that result for a different query that depends on the result somewhere inside the nested route, I get the following error when navigating from somewhere else to that route: CleanShot 2023-10-03 at 20 25 03

Reloading that route or directly navigating to it works fine though. It only happens when the route wasn't loaded before.

Your minimal, reproducible example

https://stackblitz.com/edit/github-czovmr

Steps to reproduce

  1. Go to the home route
  2. Click on the "Nested" menu item
  3. Error appears

Expected behavior

There shouldn't be an error

How often does this bug happen?

Every time

Screenshots or Videos

CleanShot 2023-10-03 at 20 29 51

Platform

  • macOS Ventura 13.6
  • Chrome v117.0.5938.92

Tanstack Query adapter

solid-query

TanStack Query version

rc-4

TypeScript version

v5.2.2

Additional context

No response

  1. TkDodo added labelspackage: solid-query

  2. TkDodo added labelsv5

  3. @ardeora FYI

  4. Should be fixed in the new versions and up! v5.0.0-rc.8 If you could please update your dependency and check if it works as expected, that would be awesome :D

    Here is the reproduction with the new version https://stackblitz.com/edit/github-czovmr-yqt3yz

  5. Should be fixed in the new versions and up! v5.0.0-rc.8 If you could please update your dependency and check if it works as expected, that would be awesome :D

    Here is the reproduction with the new version https://stackblitz.com/edit/github-czovmr-yqt3yz

    It works now. 😊 Thank you very much, Aryan – you're the king! 👏

Sign in to join this conversation.