@@ -99,7 +99,7 @@ export abstract class FetcherRenderer {
9999 ${ implHookOuter }
100100 return ${ infiniteQuery . getHook ( ) } <${ operationResultType } , TError, TData>(
101101 ${ this . generateInfiniteQueryFormattedParameters (
102- this . generateInfiniteQueryKey ( config , isSuspense ) ,
102+ this . generateInfiniteQueryKey ( config ) ,
103103 implFetcher ,
104104 ) }
105105 )};` ;
@@ -136,7 +136,7 @@ export abstract class FetcherRenderer {
136136 ${ implHookOuter }
137137 return ${ query . getHook ( ) } <${ operationResultType } , TError, TData>(
138138 ${ this . generateQueryFormattedParameters (
139- this . generateQueryKey ( config , isSuspense ) ,
139+ this . generateQueryKey ( config ) ,
140140 implFetcher ,
141141 ) }
142142 )};` ;
@@ -222,8 +222,8 @@ export abstract class FetcherRenderer {
222222 return `options: Omit<${ infiniteQuery . getOptions ( ) } <${ operationResultType } , TError, TData>, 'queryKey'> & { queryKey?: ${ infiniteQuery . getOptions ( ) } <${ operationResultType } , TError, TData>['queryKey'] }` ;
223223 }
224224
225- public generateInfiniteQueryKey ( config : GenerateConfig , isSuspense : boolean ) : string {
226- const identifier = isSuspense ? 'infiniteSuspense' : 'infinite' ;
225+ public generateInfiniteQueryKey ( config : GenerateConfig ) : string {
226+ const identifier = 'infinite' ;
227227 if ( config . hasRequiredVariables )
228228 return `['${ config . node . name . value } .${ identifier } ', variables]` ;
229229 return `variables === undefined ? ['${ config . node . name . value } .${ identifier } '] : ['${ config . node . name . value } .${ identifier } ', variables]` ;
@@ -237,13 +237,13 @@ export abstract class FetcherRenderer {
237237 hook : this . generateInfiniteQueryHook ( config , isSuspense ) ,
238238 getKey : `${ infiniteQuery . getHook (
239239 operationName ,
240- ) } .getKey = (${ signature } ) => ${ this . generateInfiniteQueryKey ( config , isSuspense ) } ;`,
240+ ) } .getKey = (${ signature } ) => ${ this . generateInfiniteQueryKey ( config ) } ;`,
241241 rootKey : `${ infiniteQuery . getHook ( operationName ) } .rootKey = '${ node . name . value } .infinite';` ,
242242 } ;
243243 }
244244
245- public generateQueryKey ( config : GenerateConfig , isSuspense : boolean ) : string {
246- const identifier = isSuspense ? ` ${ config . node . name . value } Suspense` : config . node . name . value ;
245+ public generateQueryKey ( config : GenerateConfig ) : string {
246+ const identifier = config . node . name . value ;
247247 if ( config . hasRequiredVariables ) return `['${ identifier } ', variables]` ;
248248 return `variables === undefined ? ['${ identifier } '] : ['${ identifier } ', variables]` ;
249249 }
@@ -255,10 +255,7 @@ export abstract class FetcherRenderer {
255255 return {
256256 hook : this . generateQueryHook ( config , isSuspense ) ,
257257 document : `${ query . getHook ( operationName ) } .document = ${ documentVariableName } ;` ,
258- getKey : `${ query . getHook ( operationName ) } .getKey = (${ signature } ) => ${ this . generateQueryKey (
259- config ,
260- isSuspense ,
261- ) } ;`,
258+ getKey : `${ query . getHook ( operationName ) } .getKey = (${ signature } ) => ${ this . generateQueryKey ( config ) } ;` ,
262259 rootKey : `${ query . getHook ( operationName ) } .rootKey = '${ node . name . value } ';` ,
263260 } ;
264261 }
0 commit comments