Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/curly-places-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/solid-query': patch
---

fix(solid-query): prevent SSR stream hang caused by unstripped promise field
5 changes: 3 additions & 2 deletions packages/solid-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ const hydratableObserverResult = <
if (!isServer) return result
const obj: any = {
...unwrap(result),
// During SSR, functions cannot be serialized, so we need to remove them
// This is safe because we will add these functions back when the query is hydrated
// During SSR, non-serializable values (functions, promises) must be removed.
// This is safe because they will be reconstructed when the query is hydrated.
refetch: undefined,
promise: undefined,
}

// If the query is an infinite query, we need to remove additional properties
Expand Down