File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ export function useBaseQuery<
4949 const errorResetBoundary = useQueryErrorResetBoundary ( )
5050 const defaultedOptions = client . defaultQueryOptions ( options )
5151
52+ ; ( client . getDefaultOptions ( ) as any ) . _experimental_beforeQuery ?.(
53+ defaultedOptions ,
54+ )
55+
5256 // Make sure results are optimistically set in fetching state before subscribing or updating options
5357 defaultedOptions . _optimisticResults = isRestoring
5458 ? 'isRestoring'
@@ -121,6 +125,13 @@ export function useBaseQuery<
121125 throw result . error
122126 }
123127
128+ if ( defaultedOptions . suspense ) {
129+ ; ( client . getDefaultOptions ( ) as any ) . _experimental_afterSuspend ?.(
130+ defaultedOptions ,
131+ result ,
132+ )
133+ }
134+
124135 // Handle result property usage tracking
125136 return ! defaultedOptions . notifyOnChangeProps
126137 ? observer . trackResult ( result )
You can’t perform that action at this time.
0 commit comments