File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,13 @@ function createVueQueryProxyDecoration<TRouter extends AnyTRPCRouter>(
85
85
const queryFn = computed < QueryFunction > ( ( ) => async ( { signal } ) => {
86
86
const input = toValue ( _input )
87
87
88
- const output = await trpc . query ( joinedPath , input , {
89
- signal,
90
- ...trpcOptions ,
91
- } )
88
+ const output =
89
+ input === skipToken
90
+ ? undefined
91
+ : await trpc . query ( joinedPath , input , {
92
+ signal,
93
+ ...trpcOptions ,
94
+ } )
92
95
93
96
if ( type === 'queries' ) return { output, input }
94
97
@@ -163,6 +166,8 @@ function createVueQueryProxyDecoration<TRouter extends AnyTRPCRouter>(
163
166
watch (
164
167
inputData ,
165
168
( ) => {
169
+ if ( inputData . value === skipToken ) return
170
+
166
171
subscription . value ?. unsubscribe ( )
167
172
168
173
subscription . value = trpc . subscription ( joinedPath , inputData . value , {
You can’t perform that action at this time.
0 commit comments