File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -76,16 +76,20 @@ function createVueQueryProxyDecoration<TRouter extends AnyTRPCRouter>(
76
76
}
77
77
78
78
function createQuery (
79
- input : MaybeRefOrGetter < unknown > ,
79
+ _input : MaybeRefOrGetter < unknown > ,
80
80
{ trpcOptions, queryOptions } : { trpcOptions : any ; queryOptions : any } ,
81
81
) {
82
+ const input = toValue ( _input )
83
+
82
84
return defineQueryOptions ( {
83
- queryKey : computed ( ( ) => getQueryKey ( path , toValue ( input ) , 'query' ) ) ,
84
- queryFn : async ( { queryKey , signal } ) =>
85
- trpc . query ( joinedPath , queryKey [ 1 ] ?. input , {
85
+ queryKey : computed ( ( ) => getQueryKey ( path , input , 'query' ) ) ,
86
+ queryFn : async ( { signal } ) => ( {
87
+ output : await trpc . query ( joinedPath , input , {
86
88
signal,
87
89
...trpcOptions ,
88
90
} ) ,
91
+ input,
92
+ } ) ,
89
93
...maybeToRefs ( queryOptions ) ,
90
94
} )
91
95
}
You can’t perform that action at this time.
0 commit comments