@@ -258,7 +258,7 @@ type GetQueryKey<TInput = undefined> = [TInput] extends [undefined | void]
258
258
* Method to extract the query key for a procedure
259
259
* @param type - defaults to `any`
260
260
*/
261
- [ Procedure . queryKey ] : ( input : TInput , type ?: QueryType ) => TRPCQueryKey ;
261
+ [ Procedure . queryKey ] : ( input ? : TInput , type ?: QueryType ) => TRPCQueryKey ;
262
262
} & { } ;
263
263
264
264
function getClientArgs < TOptions > (
@@ -942,6 +942,7 @@ const utilProcedures: Record<
942
942
} ,
943
943
[ Util . Query . invalidate ] : ( { path, queryClient, key } ) => {
944
944
return ( input ?: any , filters ?: any , options ?: any ) => {
945
+ console . log ( path , input , getQueryType ( key as any ) ) ;
945
946
const queryKey = getQueryKeyInternal (
946
947
path ,
947
948
input ,
@@ -1087,7 +1088,9 @@ function createUtilsProxy(ctx: WrapperContext) {
1087
1088
if ( key === Util . Query . client ) return ctx . baseClient ;
1088
1089
1089
1090
if ( hasOwn ( utilProcedures , key ) ) {
1090
- return utilProcedures [ key ] ( Object . assign ( ctx , { key } ) ) ;
1091
+ return utilProcedures [ key ] (
1092
+ Object . assign ( ctx , { key, path : this . path } )
1093
+ ) ;
1091
1094
}
1092
1095
1093
1096
return this . nest ( ( ) => { } ) ;
@@ -1132,7 +1135,7 @@ const procedures: Record<
1132
1135
( ctx : WrapperContext ) => any
1133
1136
> = {
1134
1137
[ Procedure . queryKey ] : ( { path } ) => {
1135
- return ( input : any , opts ?: any ) => getQueryKeyInternal ( path , input , opts ) ;
1138
+ return ( input ? : any , opts ?: any ) => getQueryKeyInternal ( path , input , opts ) ;
1136
1139
} ,
1137
1140
[ Procedure . query ] : ( { path, client, abortOnUnmount, queryClient } ) => {
1138
1141
return ( input : any , opts ?: any ) => {
0 commit comments