File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-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,11 @@ export function useBaseQuery<
121125 throw result . error
122126 }
123127
128+ ; ( client . getDefaultOptions ( ) as any ) . _experimental_afterSuspend ?.(
129+ defaultedOptions ,
130+ result ,
131+ )
132+
124133 // Handle result property usage tracking
125134 return ! defaultedOptions . notifyOnChangeProps
126135 ? observer . trackResult ( result )
You can’t perform that action at this time.
0 commit comments