Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solid Query is mixing up queries during SSR #7289

Open
PeterDraex opened this issue Apr 16, 2024 · 2 comments
Open

Solid Query is mixing up queries during SSR #7289

PeterDraex opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels

Comments

@PeterDraex
Copy link

Describe the bug

During SSR, query.data is receiving data from another query function.

Your minimal, reproducible example

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

Steps to reproduce

  1. Look at Page.tsx - notice that pageQuery query function resolves to pageQuery API response. However, when you print it, pageQuery.data: "ComponentA API response" is rendered instead.
  2. Note that this is an Astro project and the client:load directive is not used, so this page is never hydrated.

Expected behavior

Output is

...
pageQuery.data: "pageQuery API response"

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Chrome, Windows

Tanstack Query adapter

solid-query

TanStack Query version

5.30.3

TypeScript version

No response

Additional context

cc @ardeora

@ardeora
Copy link
Contributor

ardeora commented Apr 16, 2024

Well this was strange at first but this looks like a bug in maybe astro or solid-js. I'm using createResource here and still see the same issue

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

@ardeora ardeora self-assigned this Apr 16, 2024
@PeterDraex
Copy link
Author

Issue in SolidJS repo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants