Skip to content

Commit eb48384

Browse files
committed
fix: input change did not retrigger query
1 parent c5d4e2d commit eb48384

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ function createVueQueryProxyDecoration<TRouter extends AnyTRPCRouter>(
8080
{ trpcOptions, queryOptions }: { trpcOptions: any; queryOptions: any },
8181
{ includeInput = false } = {},
8282
) {
83-
const input = toValue(_input)
84-
8583
return defineQueryOptions({
86-
queryKey: computed(() => getQueryKey(path, input, 'query')),
84+
queryKey: computed(() => getQueryKey(path, toValue(_input), 'query')),
8785
queryFn: async ({ signal }) => {
86+
const input = toValue(_input)
87+
8888
const output = await trpc.query(joinedPath, input, {
8989
signal,
9090
...trpcOptions,

0 commit comments

Comments
 (0)