Skip to content
Merged
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
7 changes: 5 additions & 2 deletions packages/solid-query/src/createBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ export function createBaseQuery<
return observer.subscribe((result) => {
notifyManager.batchCalls(() => {
const query = observer.getCurrentQuery()
const { refetch, ...rest } = unwrap(result)
const unwrappedResult = {
...unwrap(result),
...rest,

// hydrate() expects a QueryState object, which is similar but not
// quite the same as a QueryObserverResult object. Thus, for now, we're
Expand All @@ -84,7 +85,9 @@ export function createBaseQuery<
reject(unwrappedResult.error)
}
if (unwrappedResult.isSuccess) {
resolve(unwrappedResult)
// Use of any here is fine
// We cannot include refetch since it is not serializable
resolve(unwrappedResult as any)
}
})()
})
Expand Down