@falcondev-oss/trpc-vue-query 0.5.0-rc.14 → 0.5.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -61,6 +61,7 @@ function createVueQueryProxyDecoration(name, trpc, queryClient) {
61
61
  function createQuery(_input, { trpcOptions, queryOptions }, { type = "query" } = {}) {
62
62
  const queryFn = (0, import_vue.computed)(() => async ({ signal }) => {
63
63
  const input = (0, import_core.toValue)(_input);
64
+ if (input === import_vue_query.skipToken) return import_vue_query.skipToken;
64
65
  const output = await trpc.query(joinedPath, input, {
65
66
  signal,
66
67
  ...trpcOptions
@@ -125,6 +126,7 @@ function createVueQueryProxyDecoration(name, trpc, queryClient) {
125
126
  (0, import_vue.watch)(
126
127
  inputData,
127
128
  () => {
129
+ if (inputData.value === import_vue_query.skipToken) return;
128
130
  subscription.value?.unsubscribe();
129
131
  subscription.value = trpc.subscription(joinedPath, inputData.value, {
130
132
  ...opts
package/dist/index.mjs CHANGED
@@ -46,6 +46,7 @@ function createVueQueryProxyDecoration(name, trpc, queryClient) {
46
46
  function createQuery(_input, { trpcOptions, queryOptions }, { type = "query" } = {}) {
47
47
  const queryFn = computed(() => async ({ signal }) => {
48
48
  const input = toValue(_input);
49
+ if (input === skipToken) return skipToken;
49
50
  const output = await trpc.query(joinedPath, input, {
50
51
  signal,
51
52
  ...trpcOptions
@@ -110,6 +111,7 @@ function createVueQueryProxyDecoration(name, trpc, queryClient) {
110
111
  watch(
111
112
  inputData,
112
113
  () => {
114
+ if (inputData.value === skipToken) return;
113
115
  subscription.value?.unsubscribe();
114
116
  subscription.value = trpc.subscription(joinedPath, inputData.value, {
115
117
  ...opts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/trpc-vue-query",
3
3
  "type": "module",
4
- "version": "0.5.0-rc.14",
4
+ "version": "0.5.0-rc.16",
5
5
  "description": "A tRPC wrapper around '@tanstack/vue-query'",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/trpc-vue-query",