File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,9 @@ export function createBaseQuery<
64
64
return observer . subscribe ( ( result ) => {
65
65
notifyManager . batchCalls ( ( ) => {
66
66
const query = observer . getCurrentQuery ( )
67
+ const { refetch, ...rest } = unwrap ( result )
67
68
const unwrappedResult = {
68
- ...unwrap ( result ) ,
69
+ ...rest ,
69
70
70
71
// hydrate() expects a QueryState object, which is similar but not
71
72
// quite the same as a QueryObserverResult object. Thus, for now, we're
@@ -84,7 +85,9 @@ export function createBaseQuery<
84
85
reject ( unwrappedResult . error )
85
86
}
86
87
if ( unwrappedResult . isSuccess ) {
87
- resolve ( unwrappedResult )
88
+ // Use of any here is fine
89
+ // We cannot include refetch since it is not serializable
90
+ resolve ( unwrappedResult as any )
88
91
}
89
92
} ) ( )
90
93
} )
You can’t perform that action at this time.
0 commit comments