@orpc/vue-query 0.0.0-next.f81b4a2 → 0.0.0-next.fa75202

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/README.md CHANGED
@@ -21,28 +21,24 @@
21
21
 
22
22
  <h3 align="center">Typesafe APIs Made Simple 🪄</h3>
23
23
 
24
- **oRPC is a powerful combination of RPC and OpenAPI**, makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards, ensuring a smooth and enjoyable developer experience.
24
+ **oRPC is a powerful combination of RPC and OpenAPI**, makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards
25
25
 
26
26
  ---
27
27
 
28
28
  ## Highlights
29
29
 
30
- - **End-to-End Type Safety 🔒**: Ensure complete type safety from inputs to outputs and errors, bridging server and client seamlessly.
31
- - **First-Class OpenAPI 📄**: Adheres to the OpenAPI standard out of the box, ensuring seamless integration and comprehensive API documentation.
32
- - **Contract-First Development 📜**: (Optional) Define your API contract upfront and implement it with confidence.
33
- - **Exceptional Developer Experience ✨**: Enjoy a streamlined workflow with robust typing and clear, in-code documentation.
34
- - **Multi-Runtime Support 🌍**: Run your code seamlessly on Cloudflare, Deno, Bun, Node.js, and more.
35
- - **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
36
- - **Server Actions ⚡️**: Fully compatible with React Server Actions on Next.js, TanStack Start, and more.
37
- - **Standard Schema Support 🗂️**: Effortlessly work with Zod, Valibot, ArkType, and others right out of the box.
38
- - **Fast & Lightweight 💨**: Built on native APIs across all runtimes – optimized for speed and efficiency.
39
- - **Native Types 📦**: Enjoy built-in support for Date, File, Blob, BigInt, URL and more with no extra setup.
40
- - **Lazy Router ⏱️**: Improve cold start times with our lazy routing feature.
41
- - **SSE & Streaming 📡**: Provides SSE and streaming features – perfect for real-time notifications and AI-powered streaming responses.
42
- - **Reusability 🔄**: Write once and reuse your code across multiple purposes effortlessly.
43
- - **Extendability 🔌**: Easily enhance oRPC with plugins, middleware, and interceptors.
44
- - **Reliability 🛡️**: Well-tested, fully TypeScript, production-ready, and MIT licensed for peace of mind.
45
- - **Simplicity 💡**: Enjoy straightforward, clean code with no hidden magic.
30
+ - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
+ - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
+ - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
34
+ - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
+ - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
36
+ - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
37
+ - **⏱️ Lazy Router**: Enhance cold start times with our lazy routing feature.
38
+ - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
+ - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
+ - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
+ - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
46
42
 
47
43
  ## Documentation
48
44
 
@@ -53,6 +49,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
53
49
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
54
50
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
55
51
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
+ - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with NestJS.
56
53
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
57
54
  - [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
58
55
  - [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ClientContext, Client, NestedClient } from '@orpc/client';
2
- import { QueryKey, QueryObserverOptions, QueryFunctionContext, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
2
+ import { QueryKey, SkipToken, QueryObserverOptions, QueryFunctionContext, experimental_streamedQuery, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
3
3
  import { PartialDeep, AnyFunction, MaybeOptionalOptions } from '@orpc/shared';
4
4
  import { MaybeRef, MaybeRefOrGetter, ComputedRef, Ref } from 'vue';
5
5
 
6
- type KeyType = 'query' | 'infinite' | 'mutation' | undefined;
6
+ type KeyType = 'query' | 'streamed' | 'infinite' | 'mutation' | undefined;
7
7
  interface BuildKeyOptions<TType extends KeyType, TInput> {
8
8
  type?: TType;
9
9
  input?: TType extends 'mutation' ? never : PartialDeep<TInput>;
@@ -28,9 +28,9 @@ type MaybeRefDeep<T> = MaybeRef<T extends AnyFunction ? T : T extends object ? {
28
28
  [Property in keyof T]: MaybeRefDeep<T[Property]>;
29
29
  } : T>;
30
30
  type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = (undefined extends TInput ? {
31
- input?: MaybeRefDeep<TInput>;
31
+ input?: MaybeRefDeep<TInput | SkipToken>;
32
32
  } : {
33
- input: MaybeRefDeep<TInput>;
33
+ input: MaybeRefDeep<TInput | SkipToken>;
34
34
  }) & (Record<never, never> extends TClientContext ? {
35
35
  context?: MaybeRefDeep<TClientContext>;
36
36
  } : {
@@ -45,17 +45,22 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
45
45
  interface QueryOptionsBase<TOutput, TError> {
46
46
  queryKey: ComputedRef<QueryKey>;
47
47
  queryFn(ctx: QueryFunctionContext): Promise<TOutput>;
48
- retry?(failureCount: number, error: TError): boolean;
48
+ throwOnError?(error: TError): boolean;
49
+ enabled: ComputedRef<boolean>;
49
50
  }
50
- type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData, TPageParam> = {
51
- input: (pageParam: TPageParam) => MaybeRefDeep<TInput>;
52
- } & (Record<never, never> extends TClientContext ? {
51
+ type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0], 'queryFn'>;
52
+ type experimental_InferStreamedOutput<TOutput> = TOutput extends AsyncIterable<infer U> ? U[] : never;
53
+ type experimental_StreamedOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = QueryOptionsIn<TClientContext, TInput, TOutput, TError, TSelectData> & experimental_StreamedQueryOptions;
54
+ interface experimental_StreamedOptionsBase<TOutput, TError> extends QueryOptionsBase<TOutput, TError> {
55
+ }
56
+ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData, TPageParam> = (Record<never, never> extends TClientContext ? {
53
57
  context?: MaybeRefDeep<TClientContext>;
54
58
  } : {
55
59
  context: MaybeRefDeep<TClientContext>;
56
60
  }) & {
57
61
  [Property in keyof Omit<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>, 'queryKey' | 'enabled'>]: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>[Property]>;
58
62
  } & {
63
+ input: MaybeRef<((pageParam: TPageParam) => MaybeRefDeep<TInput>) | SkipToken>;
59
64
  enabled?: MaybeRefOrGetter<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['enabled']>;
60
65
  queryKey?: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['queryKey']>;
61
66
  shallow?: boolean;
@@ -63,7 +68,8 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
63
68
  interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
64
69
  queryKey: ComputedRef<QueryKey>;
65
70
  queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
66
- retry?(failureCount: number, error: TError): boolean;
71
+ throwOnError?(error: TError): boolean;
72
+ enabled: ComputedRef<boolean>;
67
73
  }
68
74
  type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
69
75
  context?: TClientContext;
@@ -89,6 +95,13 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
89
95
  * @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-options-utility Tanstack Query Options Utility Docs}
90
96
  */
91
97
  queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
98
+ /**
99
+ * Generate [Event Iterator](https://orpc.unnoq.com/docs/event-iterator) options used for useQuery/prefetchQuery/...
100
+ * Built on top of [steamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
101
+ *
102
+ * @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
103
+ */
104
+ experimental_streamedOptions<U, USelectData = experimental_InferStreamedOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_InferStreamedOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_InferStreamedOutput<TOutput>, TError>, keyof U>>;
92
105
  /**
93
106
  * Generate options used for useInfiniteQuery/prefetchInfiniteQuery/...
94
107
  *
@@ -127,4 +140,4 @@ type UnrefDeep<T> = T extends Ref<infer U> ? UnrefDeep<U> : T extends AnyFunctio
127
140
  declare function unrefDeep<T>(value: T): UnrefDeep<T>;
128
141
 
129
142
  export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueQueryUtils, createProcedureUtils, createRouterUtils, unrefDeep };
130
- export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep };
143
+ export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep, experimental_InferStreamedOutput, experimental_StreamedOptionsBase, experimental_StreamedOptionsIn };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ClientContext, Client, NestedClient } from '@orpc/client';
2
- import { QueryKey, QueryObserverOptions, QueryFunctionContext, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
2
+ import { QueryKey, SkipToken, QueryObserverOptions, QueryFunctionContext, experimental_streamedQuery, InfiniteQueryObserverOptions, MutationObserverOptions, InfiniteData } from '@tanstack/vue-query';
3
3
  import { PartialDeep, AnyFunction, MaybeOptionalOptions } from '@orpc/shared';
4
4
  import { MaybeRef, MaybeRefOrGetter, ComputedRef, Ref } from 'vue';
5
5
 
6
- type KeyType = 'query' | 'infinite' | 'mutation' | undefined;
6
+ type KeyType = 'query' | 'streamed' | 'infinite' | 'mutation' | undefined;
7
7
  interface BuildKeyOptions<TType extends KeyType, TInput> {
8
8
  type?: TType;
9
9
  input?: TType extends 'mutation' ? never : PartialDeep<TInput>;
@@ -28,9 +28,9 @@ type MaybeRefDeep<T> = MaybeRef<T extends AnyFunction ? T : T extends object ? {
28
28
  [Property in keyof T]: MaybeRefDeep<T[Property]>;
29
29
  } : T>;
30
30
  type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = (undefined extends TInput ? {
31
- input?: MaybeRefDeep<TInput>;
31
+ input?: MaybeRefDeep<TInput | SkipToken>;
32
32
  } : {
33
- input: MaybeRefDeep<TInput>;
33
+ input: MaybeRefDeep<TInput | SkipToken>;
34
34
  }) & (Record<never, never> extends TClientContext ? {
35
35
  context?: MaybeRefDeep<TClientContext>;
36
36
  } : {
@@ -45,17 +45,22 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
45
45
  interface QueryOptionsBase<TOutput, TError> {
46
46
  queryKey: ComputedRef<QueryKey>;
47
47
  queryFn(ctx: QueryFunctionContext): Promise<TOutput>;
48
- retry?(failureCount: number, error: TError): boolean;
48
+ throwOnError?(error: TError): boolean;
49
+ enabled: ComputedRef<boolean>;
49
50
  }
50
- type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData, TPageParam> = {
51
- input: (pageParam: TPageParam) => MaybeRefDeep<TInput>;
52
- } & (Record<never, never> extends TClientContext ? {
51
+ type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0], 'queryFn'>;
52
+ type experimental_InferStreamedOutput<TOutput> = TOutput extends AsyncIterable<infer U> ? U[] : never;
53
+ type experimental_StreamedOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = QueryOptionsIn<TClientContext, TInput, TOutput, TError, TSelectData> & experimental_StreamedQueryOptions;
54
+ interface experimental_StreamedOptionsBase<TOutput, TError> extends QueryOptionsBase<TOutput, TError> {
55
+ }
56
+ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData, TPageParam> = (Record<never, never> extends TClientContext ? {
53
57
  context?: MaybeRefDeep<TClientContext>;
54
58
  } : {
55
59
  context: MaybeRefDeep<TClientContext>;
56
60
  }) & {
57
61
  [Property in keyof Omit<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>, 'queryKey' | 'enabled'>]: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>[Property]>;
58
62
  } & {
63
+ input: MaybeRef<((pageParam: TPageParam) => MaybeRefDeep<TInput>) | SkipToken>;
59
64
  enabled?: MaybeRefOrGetter<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['enabled']>;
60
65
  queryKey?: MaybeRefDeep<InfiniteQueryObserverOptions<TOutput, TError, TSelectData, TOutput, QueryKey, TPageParam>['queryKey']>;
61
66
  shallow?: boolean;
@@ -63,7 +68,8 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
63
68
  interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
64
69
  queryKey: ComputedRef<QueryKey>;
65
70
  queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
66
- retry?(failureCount: number, error: TError): boolean;
71
+ throwOnError?(error: TError): boolean;
72
+ enabled: ComputedRef<boolean>;
67
73
  }
68
74
  type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
69
75
  context?: TClientContext;
@@ -89,6 +95,13 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
89
95
  * @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-options-utility Tanstack Query Options Utility Docs}
90
96
  */
91
97
  queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
98
+ /**
99
+ * Generate [Event Iterator](https://orpc.unnoq.com/docs/event-iterator) options used for useQuery/prefetchQuery/...
100
+ * Built on top of [steamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
101
+ *
102
+ * @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
103
+ */
104
+ experimental_streamedOptions<U, USelectData = experimental_InferStreamedOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_InferStreamedOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_InferStreamedOutput<TOutput>, TError>, keyof U>>;
92
105
  /**
93
106
  * Generate options used for useInfiniteQuery/prefetchInfiniteQuery/...
94
107
  *
@@ -127,4 +140,4 @@ type UnrefDeep<T> = T extends Ref<infer U> ? UnrefDeep<U> : T extends AnyFunctio
127
140
  declare function unrefDeep<T>(value: T): UnrefDeep<T>;
128
141
 
129
142
  export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueQueryUtils, createProcedureUtils, createRouterUtils, unrefDeep };
130
- export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep };
143
+ export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, InfiniteOptionsBase, InfiniteOptionsIn, KeyType, MaybeRefDeep, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptionsBase, QueryOptionsIn, RouterUtils, UnrefDeep, experimental_InferStreamedOutput, experimental_StreamedOptionsBase, experimental_StreamedOptionsIn };
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
+ import { isObject, isAsyncIteratorObject } from '@orpc/shared';
2
+ import { skipToken, experimental_streamedQuery } from '@tanstack/vue-query';
1
3
  import { isRef, computed } from 'vue';
2
- import { isObject } from '@orpc/shared';
3
4
 
4
5
  function buildKey(path, options) {
5
6
  const withInput = options?.input !== void 0 ? { input: options?.input } : {};
@@ -40,18 +41,55 @@ function createProcedureUtils(client, options) {
40
41
  queryOptions(...[optionsIn = {}]) {
41
42
  return {
42
43
  queryKey: computed(() => buildKey(options.path, { type: "query", input: unrefDeep(optionsIn.input) })),
43
- queryFn: ({ signal }) => client(unrefDeep(optionsIn.input), { signal, context: unrefDeep(optionsIn.context) }),
44
+ queryFn: ({ signal }) => {
45
+ const input = unrefDeep(optionsIn.input);
46
+ if (input === skipToken) {
47
+ throw new Error("queryFn should not be called with skipToken used as input");
48
+ }
49
+ return client(input, { signal, context: unrefDeep(optionsIn.context) });
50
+ },
51
+ enabled: computed(() => unrefDeep(optionsIn.input) !== skipToken),
52
+ ...optionsIn
53
+ };
54
+ },
55
+ experimental_streamedOptions(...[optionsIn = {}]) {
56
+ return {
57
+ enabled: computed(() => unrefDeep(optionsIn.input) !== skipToken),
58
+ queryKey: computed(() => buildKey(options.path, { type: "streamed", input: unrefDeep(optionsIn.input) })),
59
+ queryFn: experimental_streamedQuery({
60
+ ...optionsIn,
61
+ queryFn: async ({ signal }) => {
62
+ const input = unrefDeep(optionsIn.input);
63
+ if (input === skipToken) {
64
+ throw new Error("queryFn should not be called with skipToken used as input");
65
+ }
66
+ const output = await client(input, { signal, context: unrefDeep(optionsIn.context) });
67
+ if (!isAsyncIteratorObject(output)) {
68
+ throw new Error("streamedQuery requires an event iterator output");
69
+ }
70
+ return output;
71
+ }
72
+ }),
44
73
  ...optionsIn
45
74
  };
46
75
  },
47
76
  infiniteOptions(optionsIn) {
48
77
  return {
49
78
  queryKey: computed(() => {
50
- return buildKey(options.path, { type: "infinite", input: unrefDeep(optionsIn.input(unrefDeep(optionsIn.initialPageParam))) });
79
+ const input = unrefDeep(optionsIn.input);
80
+ return buildKey(options.path, {
81
+ type: "infinite",
82
+ input: input === skipToken ? skipToken : unrefDeep(input(unrefDeep(optionsIn.initialPageParam)))
83
+ });
51
84
  }),
52
85
  queryFn: ({ pageParam, signal }) => {
53
- return client(unrefDeep(optionsIn.input(pageParam)), { signal, context: unrefDeep(optionsIn.context) });
86
+ const input = unrefDeep(optionsIn.input);
87
+ if (input === skipToken) {
88
+ throw new Error("queryFn should not be called with skipToken used as input");
89
+ }
90
+ return client(unrefDeep(input(pageParam)), { signal, context: unrefDeep(optionsIn.context) });
54
91
  },
92
+ enabled: computed(() => unrefDeep(optionsIn.input) !== skipToken),
55
93
  ...optionsIn
56
94
  };
57
95
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/vue-query",
3
3
  "type": "module",
4
- "version": "0.0.0-next.f81b4a2",
4
+ "version": "0.0.0-next.fa75202",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -29,11 +29,13 @@
29
29
  "peerDependencies": {
30
30
  "@tanstack/vue-query": ">=5.55.0",
31
31
  "vue": ">=3.3.0",
32
- "@orpc/client": "0.0.0-next.f81b4a2"
32
+ "@orpc/client": "0.0.0-next.fa75202"
33
33
  },
34
34
  "dependencies": {
35
- "@tanstack/vue-query": "^5.72.2",
36
- "@orpc/shared": "0.0.0-next.f81b4a2"
35
+ "@orpc/shared": "0.0.0-next.fa75202"
36
+ },
37
+ "devDependencies": {
38
+ "@tanstack/vue-query": "^5.72.3"
37
39
  },
38
40
  "scripts": {
39
41
  "build": "unbuild",