react-query-kit 3.2.1 → 3.3.0
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 +20 -2
- package/build/lib/createBaseQuery.d.ts +1 -1
- package/build/lib/createBaseQuery.esm.js +2 -2
- package/build/lib/createBaseQuery.esm.js.map +1 -1
- package/build/lib/createBaseQuery.js +1 -1
- package/build/lib/createBaseQuery.js.map +1 -1
- package/build/lib/createBaseQuery.mjs +2 -2
- package/build/lib/createBaseQuery.mjs.map +1 -1
- package/build/lib/createInfiniteQuery.d.ts +2 -2
- package/build/lib/createInfiniteQuery.esm.js +2 -2
- package/build/lib/createInfiniteQuery.esm.js.map +1 -1
- package/build/lib/createInfiniteQuery.js +2 -2
- package/build/lib/createInfiniteQuery.js.map +1 -1
- package/build/lib/createInfiniteQuery.mjs +2 -2
- package/build/lib/createInfiniteQuery.mjs.map +1 -1
- package/build/lib/createMutation.d.ts +2 -2
- package/build/lib/createMutation.esm.js +2 -2
- package/build/lib/createMutation.esm.js.map +1 -1
- package/build/lib/createMutation.js +2 -2
- package/build/lib/createMutation.js.map +1 -1
- package/build/lib/createMutation.mjs +2 -2
- package/build/lib/createMutation.mjs.map +1 -1
- package/build/lib/createQuery.d.ts +2 -2
- package/build/lib/createQuery.esm.js +2 -2
- package/build/lib/createQuery.esm.js.map +1 -1
- package/build/lib/createQuery.js +2 -2
- package/build/lib/createQuery.js.map +1 -1
- package/build/lib/createQuery.mjs +2 -2
- package/build/lib/createQuery.mjs.map +1 -1
- package/build/lib/createSuspenseInfiniteQuery.d.ts +2 -2
- package/build/lib/createSuspenseInfiniteQuery.esm.js +2 -2
- package/build/lib/createSuspenseInfiniteQuery.esm.js.map +1 -1
- package/build/lib/createSuspenseInfiniteQuery.js +2 -2
- package/build/lib/createSuspenseInfiniteQuery.js.map +1 -1
- package/build/lib/createSuspenseInfiniteQuery.mjs +2 -2
- package/build/lib/createSuspenseInfiniteQuery.mjs.map +1 -1
- package/build/lib/createSuspenseQuery.d.ts +2 -2
- package/build/lib/createSuspenseQuery.esm.js +2 -2
- package/build/lib/createSuspenseQuery.esm.js.map +1 -1
- package/build/lib/createSuspenseQuery.js +2 -2
- package/build/lib/createSuspenseQuery.js.map +1 -1
- package/build/lib/createSuspenseQuery.mjs +2 -2
- package/build/lib/createSuspenseQuery.mjs.map +1 -1
- package/build/lib/router.d.ts +8 -4
- package/build/lib/router.esm.js +10 -6
- package/build/lib/router.esm.js.map +1 -1
- package/build/lib/router.js +10 -6
- package/build/lib/router.js.map +1 -1
- package/build/lib/router.mjs +10 -6
- package/build/lib/router.mjs.map +1 -1
- package/build/lib/types.d.ts +7 -7
- package/build/stats-html.html +1 -1
- package/build/stats.json +112 -112
- package/build/umd/index.development.js +21 -17
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/createBaseQuery.ts +10 -7
- package/src/createInfiniteQuery.ts +2 -2
- package/src/createMutation.ts +2 -2
- package/src/createQuery.ts +2 -2
- package/src/createSuspenseInfiniteQuery.ts +2 -2
- package/src/createSuspenseQuery.ts +2 -2
- package/src/router.ts +10 -8
- package/src/types.ts +11 -6
- package/build/zip/zip.esm.js +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
<p align="center">
|
|
15
15
|
<a href="https://github.com/liaoliao666/react-query-kit/actions/workflows/tests.yml"><img src="https://github.com/liaoliao666/react-query-kit/actions/workflows/tests.yml/badge.svg?branch=main" alt="Latest build" target="\_parent"></a>
|
|
16
16
|
<a href="https://www.npmjs.com/package/react-query-kit"><img src="https://badgen.net/npm/v/react-query-kit" alt="Latest published version" target="\_parent"></a>
|
|
17
|
-
<a href="https://unpkg.com/browse/react-query-kit@latest/build/zip/zip.esm.js" rel="nofollow"><img src="https://img.badgesize.io/https:/unpkg.com/react-query-kit@latest/build/zip/zip.esm.js?label=gzip%20size&compression=gzip" alt="gzip size"></a>
|
|
18
17
|
<a href="https://github.com/liaoliao666/react-query-kit"><img src="https://badgen.net/npm/types/react-query-kit" alt="Types included" target="\_parent"></a>
|
|
19
18
|
<a href="https://github.com/liaoliao666/react-query-kit/blob/main/LICENSE"><img src="https://badgen.net/npm/license/react-query-kit" alt="License" target="\_parent"></a>
|
|
20
19
|
<a href="https://www.npmjs.com/package/react-query-kit"><img src="https://badgen.net/npm/dt/react-query-kit" alt="Number of downloads" target="\_parent"></a>
|
|
@@ -50,6 +49,7 @@ English | [简体中文](./README-zh_CN.md)
|
|
|
50
49
|
- [Middleware](#middleware)
|
|
51
50
|
- [TypeScript](#typescript)
|
|
52
51
|
- [Type inference](#type-inference)
|
|
52
|
+
- [Disabling Queries](#disabling-queries)
|
|
53
53
|
- [FAQ](#faq)
|
|
54
54
|
- [Migration](#migration)
|
|
55
55
|
- [Issues](#issues)
|
|
@@ -456,7 +456,7 @@ const k = {
|
|
|
456
456
|
|
|
457
457
|
### API Reference
|
|
458
458
|
|
|
459
|
-
`type Router = (key:
|
|
459
|
+
`type Router = (key: string | unknown[], config: TConfig) => TRouter`
|
|
460
460
|
|
|
461
461
|
Expose Methods
|
|
462
462
|
|
|
@@ -649,6 +649,24 @@ inferError<typeof useProjects> // Error
|
|
|
649
649
|
inferOptions<typeof useProjects> // InfiniteQueryHookOptions<...>
|
|
650
650
|
```
|
|
651
651
|
|
|
652
|
+
## Disabling Queries
|
|
653
|
+
|
|
654
|
+
To disable queries, you can pass `skipToken` as the option `variables` to your custom query. This will prevent the query from being executed.
|
|
655
|
+
|
|
656
|
+
```ts
|
|
657
|
+
import { skipToken } from '@tanstack/react-query'
|
|
658
|
+
|
|
659
|
+
const [name, setName] = useState<string | undefined>()
|
|
660
|
+
const result = usePost({
|
|
661
|
+
variables: id ? { id: id } : skipToken,
|
|
662
|
+
})
|
|
663
|
+
|
|
664
|
+
// and for useQueries example
|
|
665
|
+
const queries = useQueries({
|
|
666
|
+
queries: [usePost.getOptions(id ? { id: id } : skipToken)],
|
|
667
|
+
})
|
|
668
|
+
```
|
|
669
|
+
|
|
652
670
|
## FAQ
|
|
653
671
|
|
|
654
672
|
### What is the difference between `getFetchOptions` and `getOptions`?
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type UseInfiniteQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
export declare const createBaseQuery: (defaultOptions: any, useRQHook: (options: any, queryClient?: any) => any, overrideOptions?: Partial<UseInfiniteQueryOptions>) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { withMiddleware, getKey } from './utils.esm.js';
|
|
1
|
+
import { withMiddleware, getKey, ReactQuery } from './utils.esm.js';
|
|
2
2
|
|
|
3
3
|
const createBaseQuery = (defaultOptions, useRQHook, overrideOptions) => {
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -15,7 +15,7 @@ const createBaseQuery = (defaultOptions, useRQHook, overrideOptions) => {
|
|
|
15
15
|
|
|
16
16
|
const getQueryOptions = (fetcherFn, variables) => {
|
|
17
17
|
return {
|
|
18
|
-
queryFn: context => fetcherFn(variables, context),
|
|
18
|
+
queryFn: variables && variables === ReactQuery.skipToken ? ReactQuery.skipToken : context => fetcherFn(variables, context),
|
|
19
19
|
queryKey: getKey(defaultOptions.queryKey, variables)
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBaseQuery.esm.js","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"createBaseQuery.esm.js","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import {\n type QueryClient,\n type QueryFunctionContext,\n type UseBaseQueryOptions,\n type UseInfiniteQueryOptions,\n} from '@tanstack/react-query'\n\nimport { ReactQuery, getKey as getFullKey, withMiddleware } from './utils'\n\ntype QueryBaseHookOptions = Omit<\n UseBaseQueryOptions,\n 'queryKey' | 'queryFn'\n> & {\n fetcher?: any\n variables?: any\n}\n\nexport const createBaseQuery = (\n defaultOptions: any,\n useRQHook: (options: any, queryClient?: any) => any,\n overrideOptions?: Partial<UseInfiniteQueryOptions>\n): any => {\n if (process.env.NODE_ENV !== 'production') {\n // @ts-ignore\n if (defaultOptions.useDefaultOptions) {\n console.error(\n '[Bug] useDefaultOptions is not supported, please use middleware instead.'\n )\n }\n\n // @ts-ignore\n if (defaultOptions.queryFn) {\n console.error(\n '[Bug] queryFn is not supported, please use fetcher instead.'\n )\n }\n }\n\n const getQueryOptions = (fetcherFn: any, variables: any) => {\n return {\n queryFn:\n variables && variables === ReactQuery.skipToken\n ? ReactQuery.skipToken\n : (context: QueryFunctionContext) => fetcherFn(variables, context),\n queryKey: getFullKey(defaultOptions.queryKey, variables),\n }\n }\n\n const getKey = (variables?: any) =>\n getFullKey(defaultOptions.queryKey, variables)\n\n const getOptions = (variables: any) => {\n return {\n ...defaultOptions,\n ...getQueryOptions(defaultOptions.fetcher, variables),\n }\n }\n\n const getFetchOptions = (variables: any) => {\n return {\n ...getQueryOptions(defaultOptions.fetcher, variables),\n queryKeyHashFn: defaultOptions.queryKeyHashFn,\n getPreviousPageParam: defaultOptions.getPreviousPageParam,\n getNextPageParam: defaultOptions.getNextPageParam,\n initialPageParam: defaultOptions.initialPageParam,\n }\n }\n\n const useBaseHook = (\n options: QueryBaseHookOptions,\n queryClient?: QueryClient\n ) => {\n return useRQHook(\n {\n ...options,\n ...getQueryOptions(options.fetcher, options.variables),\n ...overrideOptions,\n },\n queryClient\n )\n }\n\n return Object.assign(withMiddleware(useBaseHook, defaultOptions, 'queries'), {\n fetcher: defaultOptions.fetcher,\n getKey,\n getOptions,\n getFetchOptions,\n })\n}\n"],"names":["createBaseQuery","defaultOptions","useRQHook","overrideOptions","process","env","NODE_ENV","useDefaultOptions","console","error","queryFn","getQueryOptions","fetcherFn","variables","ReactQuery","skipToken","context","queryKey","getFullKey","getKey","getOptions","fetcher","getFetchOptions","queryKeyHashFn","getPreviousPageParam","getNextPageParam","initialPageParam","useBaseHook","options","queryClient","Object","assign","withMiddleware"],"mappings":";;AAiBO,MAAMA,eAAe,GAAG,CAC7BC,cAD6B,EAE7BC,SAF6B,EAG7BC,eAH6B,KAIrB;AACR,EAAA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC;IACA,IAAIL,cAAc,CAACM,iBAAnB,EAAsC;MACpCC,OAAO,CAACC,KAAR,CACE,0EADF,CAAA,CAAA;AAGD,KANwC;;;IASzC,IAAIR,cAAc,CAACS,OAAnB,EAA4B;MAC1BF,OAAO,CAACC,KAAR,CACE,6DADF,CAAA,CAAA;AAGD,KAAA;AACF,GAAA;;AAED,EAAA,MAAME,eAAe,GAAG,CAACC,SAAD,EAAiBC,SAAjB,KAAoC;IAC1D,OAAO;MACLH,OAAO,EACLG,SAAS,IAAIA,SAAS,KAAKC,UAAU,CAACC,SAAtC,GACID,UAAU,CAACC,SADf,GAEKC,OAAD,IAAmCJ,SAAS,CAACC,SAAD,EAAYG,OAAZ,CAJ7C;AAKLC,MAAAA,QAAQ,EAAEC,MAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CAAA;KALtB,CAAA;GADF,CAAA;;EAUA,MAAMM,QAAM,GAAIN,SAAD,IACbK,MAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CADZ,CAAA;;EAGA,MAAMO,UAAU,GAAIP,SAAD,IAAoB;IACrC,OAAO,EACL,GAAGZ,cADE;AAEL,MAAA,GAAGU,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CAAA;KAFpB,CAAA;GADF,CAAA;;EAOA,MAAMS,eAAe,GAAIT,SAAD,IAAoB;IAC1C,OAAO,EACL,GAAGF,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CADb;MAELU,cAAc,EAAEtB,cAAc,CAACsB,cAF1B;MAGLC,oBAAoB,EAAEvB,cAAc,CAACuB,oBAHhC;MAILC,gBAAgB,EAAExB,cAAc,CAACwB,gBAJ5B;MAKLC,gBAAgB,EAAEzB,cAAc,CAACyB,gBAAAA;KALnC,CAAA;GADF,CAAA;;AAUA,EAAA,MAAMC,WAAW,GAAG,CAClBC,OADkB,EAElBC,WAFkB,KAGf;AACH,IAAA,OAAO3B,SAAS,CACd,EACE,GAAG0B,OADL;MAEE,GAAGjB,eAAe,CAACiB,OAAO,CAACP,OAAT,EAAkBO,OAAO,CAACf,SAA1B,CAFpB;MAGE,GAAGV,eAAAA;KAJS,EAMd0B,WANc,CAAhB,CAAA;GAJF,CAAA;;AAcA,EAAA,OAAOC,MAAM,CAACC,MAAP,CAAcC,cAAc,CAACL,WAAD,EAAc1B,cAAd,EAA8B,SAA9B,CAA5B,EAAsE;IAC3EoB,OAAO,EAAEpB,cAAc,CAACoB,OADmD;YAE3EF,QAF2E;IAG3EC,UAH2E;AAI3EE,IAAAA,eAAAA;AAJ2E,GAAtE,CAAP,CAAA;AAMD;;;;"}
|
|
@@ -19,7 +19,7 @@ const createBaseQuery = (defaultOptions, useRQHook, overrideOptions) => {
|
|
|
19
19
|
|
|
20
20
|
const getQueryOptions = (fetcherFn, variables) => {
|
|
21
21
|
return {
|
|
22
|
-
queryFn: context => fetcherFn(variables, context),
|
|
22
|
+
queryFn: variables && variables === utils.ReactQuery.skipToken ? utils.ReactQuery.skipToken : context => fetcherFn(variables, context),
|
|
23
23
|
queryKey: utils.getKey(defaultOptions.queryKey, variables)
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBaseQuery.js","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"createBaseQuery.js","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import {\n type QueryClient,\n type QueryFunctionContext,\n type UseBaseQueryOptions,\n type UseInfiniteQueryOptions,\n} from '@tanstack/react-query'\n\nimport { ReactQuery, getKey as getFullKey, withMiddleware } from './utils'\n\ntype QueryBaseHookOptions = Omit<\n UseBaseQueryOptions,\n 'queryKey' | 'queryFn'\n> & {\n fetcher?: any\n variables?: any\n}\n\nexport const createBaseQuery = (\n defaultOptions: any,\n useRQHook: (options: any, queryClient?: any) => any,\n overrideOptions?: Partial<UseInfiniteQueryOptions>\n): any => {\n if (process.env.NODE_ENV !== 'production') {\n // @ts-ignore\n if (defaultOptions.useDefaultOptions) {\n console.error(\n '[Bug] useDefaultOptions is not supported, please use middleware instead.'\n )\n }\n\n // @ts-ignore\n if (defaultOptions.queryFn) {\n console.error(\n '[Bug] queryFn is not supported, please use fetcher instead.'\n )\n }\n }\n\n const getQueryOptions = (fetcherFn: any, variables: any) => {\n return {\n queryFn:\n variables && variables === ReactQuery.skipToken\n ? ReactQuery.skipToken\n : (context: QueryFunctionContext) => fetcherFn(variables, context),\n queryKey: getFullKey(defaultOptions.queryKey, variables),\n }\n }\n\n const getKey = (variables?: any) =>\n getFullKey(defaultOptions.queryKey, variables)\n\n const getOptions = (variables: any) => {\n return {\n ...defaultOptions,\n ...getQueryOptions(defaultOptions.fetcher, variables),\n }\n }\n\n const getFetchOptions = (variables: any) => {\n return {\n ...getQueryOptions(defaultOptions.fetcher, variables),\n queryKeyHashFn: defaultOptions.queryKeyHashFn,\n getPreviousPageParam: defaultOptions.getPreviousPageParam,\n getNextPageParam: defaultOptions.getNextPageParam,\n initialPageParam: defaultOptions.initialPageParam,\n }\n }\n\n const useBaseHook = (\n options: QueryBaseHookOptions,\n queryClient?: QueryClient\n ) => {\n return useRQHook(\n {\n ...options,\n ...getQueryOptions(options.fetcher, options.variables),\n ...overrideOptions,\n },\n queryClient\n )\n }\n\n return Object.assign(withMiddleware(useBaseHook, defaultOptions, 'queries'), {\n fetcher: defaultOptions.fetcher,\n getKey,\n getOptions,\n getFetchOptions,\n })\n}\n"],"names":["createBaseQuery","defaultOptions","useRQHook","overrideOptions","process","env","NODE_ENV","useDefaultOptions","console","error","queryFn","getQueryOptions","fetcherFn","variables","ReactQuery","skipToken","context","queryKey","getFullKey","getKey","getOptions","fetcher","getFetchOptions","queryKeyHashFn","getPreviousPageParam","getNextPageParam","initialPageParam","useBaseHook","options","queryClient","Object","assign","withMiddleware"],"mappings":";;;;;;AAiBO,MAAMA,eAAe,GAAG,CAC7BC,cAD6B,EAE7BC,SAF6B,EAG7BC,eAH6B,KAIrB;AACR,EAAA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC;IACA,IAAIL,cAAc,CAACM,iBAAnB,EAAsC;MACpCC,OAAO,CAACC,KAAR,CACE,0EADF,CAAA,CAAA;AAGD,KANwC;;;IASzC,IAAIR,cAAc,CAACS,OAAnB,EAA4B;MAC1BF,OAAO,CAACC,KAAR,CACE,6DADF,CAAA,CAAA;AAGD,KAAA;AACF,GAAA;;AAED,EAAA,MAAME,eAAe,GAAG,CAACC,SAAD,EAAiBC,SAAjB,KAAoC;IAC1D,OAAO;MACLH,OAAO,EACLG,SAAS,IAAIA,SAAS,KAAKC,gBAAU,CAACC,SAAtC,GACID,gBAAU,CAACC,SADf,GAEKC,OAAD,IAAmCJ,SAAS,CAACC,SAAD,EAAYG,OAAZ,CAJ7C;AAKLC,MAAAA,QAAQ,EAAEC,YAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CAAA;KALtB,CAAA;GADF,CAAA;;EAUA,MAAMM,MAAM,GAAIN,SAAD,IACbK,YAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CADZ,CAAA;;EAGA,MAAMO,UAAU,GAAIP,SAAD,IAAoB;IACrC,OAAO,EACL,GAAGZ,cADE;AAEL,MAAA,GAAGU,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CAAA;KAFpB,CAAA;GADF,CAAA;;EAOA,MAAMS,eAAe,GAAIT,SAAD,IAAoB;IAC1C,OAAO,EACL,GAAGF,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CADb;MAELU,cAAc,EAAEtB,cAAc,CAACsB,cAF1B;MAGLC,oBAAoB,EAAEvB,cAAc,CAACuB,oBAHhC;MAILC,gBAAgB,EAAExB,cAAc,CAACwB,gBAJ5B;MAKLC,gBAAgB,EAAEzB,cAAc,CAACyB,gBAAAA;KALnC,CAAA;GADF,CAAA;;AAUA,EAAA,MAAMC,WAAW,GAAG,CAClBC,OADkB,EAElBC,WAFkB,KAGf;AACH,IAAA,OAAO3B,SAAS,CACd,EACE,GAAG0B,OADL;MAEE,GAAGjB,eAAe,CAACiB,OAAO,CAACP,OAAT,EAAkBO,OAAO,CAACf,SAA1B,CAFpB;MAGE,GAAGV,eAAAA;KAJS,EAMd0B,WANc,CAAhB,CAAA;GAJF,CAAA;;AAcA,EAAA,OAAOC,MAAM,CAACC,MAAP,CAAcC,oBAAc,CAACL,WAAD,EAAc1B,cAAd,EAA8B,SAA9B,CAA5B,EAAsE;IAC3EoB,OAAO,EAAEpB,cAAc,CAACoB,OADmD;IAE3EF,MAF2E;IAG3EC,UAH2E;AAI3EE,IAAAA,eAAAA;AAJ2E,GAAtE,CAAP,CAAA;AAMD;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { withMiddleware, getKey } from './utils.mjs';
|
|
1
|
+
import { withMiddleware, getKey, ReactQuery } from './utils.mjs';
|
|
2
2
|
|
|
3
3
|
const createBaseQuery = (defaultOptions, useRQHook, overrideOptions) => {
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -15,7 +15,7 @@ const createBaseQuery = (defaultOptions, useRQHook, overrideOptions) => {
|
|
|
15
15
|
|
|
16
16
|
const getQueryOptions = (fetcherFn, variables) => {
|
|
17
17
|
return {
|
|
18
|
-
queryFn: context => fetcherFn(variables, context),
|
|
18
|
+
queryFn: variables && variables === ReactQuery.skipToken ? ReactQuery.skipToken : context => fetcherFn(variables, context),
|
|
19
19
|
queryKey: getKey(defaultOptions.queryKey, variables)
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBaseQuery.mjs","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"createBaseQuery.mjs","sources":["../../src/createBaseQuery.ts"],"sourcesContent":["import {\n type QueryClient,\n type QueryFunctionContext,\n type UseBaseQueryOptions,\n type UseInfiniteQueryOptions,\n} from '@tanstack/react-query'\n\nimport { ReactQuery, getKey as getFullKey, withMiddleware } from './utils'\n\ntype QueryBaseHookOptions = Omit<\n UseBaseQueryOptions,\n 'queryKey' | 'queryFn'\n> & {\n fetcher?: any\n variables?: any\n}\n\nexport const createBaseQuery = (\n defaultOptions: any,\n useRQHook: (options: any, queryClient?: any) => any,\n overrideOptions?: Partial<UseInfiniteQueryOptions>\n): any => {\n if (process.env.NODE_ENV !== 'production') {\n // @ts-ignore\n if (defaultOptions.useDefaultOptions) {\n console.error(\n '[Bug] useDefaultOptions is not supported, please use middleware instead.'\n )\n }\n\n // @ts-ignore\n if (defaultOptions.queryFn) {\n console.error(\n '[Bug] queryFn is not supported, please use fetcher instead.'\n )\n }\n }\n\n const getQueryOptions = (fetcherFn: any, variables: any) => {\n return {\n queryFn:\n variables && variables === ReactQuery.skipToken\n ? ReactQuery.skipToken\n : (context: QueryFunctionContext) => fetcherFn(variables, context),\n queryKey: getFullKey(defaultOptions.queryKey, variables),\n }\n }\n\n const getKey = (variables?: any) =>\n getFullKey(defaultOptions.queryKey, variables)\n\n const getOptions = (variables: any) => {\n return {\n ...defaultOptions,\n ...getQueryOptions(defaultOptions.fetcher, variables),\n }\n }\n\n const getFetchOptions = (variables: any) => {\n return {\n ...getQueryOptions(defaultOptions.fetcher, variables),\n queryKeyHashFn: defaultOptions.queryKeyHashFn,\n getPreviousPageParam: defaultOptions.getPreviousPageParam,\n getNextPageParam: defaultOptions.getNextPageParam,\n initialPageParam: defaultOptions.initialPageParam,\n }\n }\n\n const useBaseHook = (\n options: QueryBaseHookOptions,\n queryClient?: QueryClient\n ) => {\n return useRQHook(\n {\n ...options,\n ...getQueryOptions(options.fetcher, options.variables),\n ...overrideOptions,\n },\n queryClient\n )\n }\n\n return Object.assign(withMiddleware(useBaseHook, defaultOptions, 'queries'), {\n fetcher: defaultOptions.fetcher,\n getKey,\n getOptions,\n getFetchOptions,\n })\n}\n"],"names":["createBaseQuery","defaultOptions","useRQHook","overrideOptions","process","env","NODE_ENV","useDefaultOptions","console","error","queryFn","getQueryOptions","fetcherFn","variables","ReactQuery","skipToken","context","queryKey","getFullKey","getKey","getOptions","fetcher","getFetchOptions","queryKeyHashFn","getPreviousPageParam","getNextPageParam","initialPageParam","useBaseHook","options","queryClient","Object","assign","withMiddleware"],"mappings":";;AAiBO,MAAMA,eAAe,GAAG,CAC7BC,cAD6B,EAE7BC,SAF6B,EAG7BC,eAH6B,KAIrB;AACR,EAAA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC;IACA,IAAIL,cAAc,CAACM,iBAAnB,EAAsC;MACpCC,OAAO,CAACC,KAAR,CACE,0EADF,CAAA,CAAA;AAGD,KANwC;;;IASzC,IAAIR,cAAc,CAACS,OAAnB,EAA4B;MAC1BF,OAAO,CAACC,KAAR,CACE,6DADF,CAAA,CAAA;AAGD,KAAA;AACF,GAAA;;AAED,EAAA,MAAME,eAAe,GAAG,CAACC,SAAD,EAAiBC,SAAjB,KAAoC;IAC1D,OAAO;MACLH,OAAO,EACLG,SAAS,IAAIA,SAAS,KAAKC,UAAU,CAACC,SAAtC,GACID,UAAU,CAACC,SADf,GAEKC,OAAD,IAAmCJ,SAAS,CAACC,SAAD,EAAYG,OAAZ,CAJ7C;AAKLC,MAAAA,QAAQ,EAAEC,MAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CAAA;KALtB,CAAA;GADF,CAAA;;EAUA,MAAMM,QAAM,GAAIN,SAAD,IACbK,MAAU,CAACjB,cAAc,CAACgB,QAAhB,EAA0BJ,SAA1B,CADZ,CAAA;;EAGA,MAAMO,UAAU,GAAIP,SAAD,IAAoB;IACrC,OAAO,EACL,GAAGZ,cADE;AAEL,MAAA,GAAGU,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CAAA;KAFpB,CAAA;GADF,CAAA;;EAOA,MAAMS,eAAe,GAAIT,SAAD,IAAoB;IAC1C,OAAO,EACL,GAAGF,eAAe,CAACV,cAAc,CAACoB,OAAhB,EAAyBR,SAAzB,CADb;MAELU,cAAc,EAAEtB,cAAc,CAACsB,cAF1B;MAGLC,oBAAoB,EAAEvB,cAAc,CAACuB,oBAHhC;MAILC,gBAAgB,EAAExB,cAAc,CAACwB,gBAJ5B;MAKLC,gBAAgB,EAAEzB,cAAc,CAACyB,gBAAAA;KALnC,CAAA;GADF,CAAA;;AAUA,EAAA,MAAMC,WAAW,GAAG,CAClBC,OADkB,EAElBC,WAFkB,KAGf;AACH,IAAA,OAAO3B,SAAS,CACd,EACE,GAAG0B,OADL;MAEE,GAAGjB,eAAe,CAACiB,OAAO,CAACP,OAAT,EAAkBO,OAAO,CAACf,SAA1B,CAFpB;MAGE,GAAGV,eAAAA;KAJS,EAMd0B,WANc,CAAhB,CAAA;GAJF,CAAA;;AAcA,EAAA,OAAOC,MAAM,CAACC,MAAP,CAAcC,cAAc,CAACL,WAAD,EAAc1B,cAAd,EAA8B,SAA9B,CAA5B,EAAsE;IAC3EoB,OAAO,EAAEpB,cAAc,CAACoB,OADmD;YAE3EF,QAF2E;IAG3EC,UAH2E;AAI3EE,IAAAA,eAAAA;AAJ2E,GAAtE,CAAP,CAAA;AAMD;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CreateInfiniteQueryOptions, InfiniteQueryHook } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { CompatibleError, CreateInfiniteQueryOptions, InfiniteQueryHook } from './types';
|
|
2
|
+
export declare function createInfiniteQuery<TFnData, TVariables = void, TError = CompatibleError, TPageParam = number>(options: CreateInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>): InfiniteQueryHook<TFnData, TVariables, TError, TPageParam>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.esm.js';
|
|
2
2
|
import { ReactQuery } from './utils.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createInfiniteQuery(options) {
|
|
5
5
|
return createBaseQuery(options, ReactQuery.useInfiniteQuery);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createInfiniteQuery };
|
|
9
9
|
//# sourceMappingURL=createInfiniteQuery.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInfiniteQuery.esm.js","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createInfiniteQuery.esm.js","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport function createInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>\n): InfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return createBaseQuery(options, ReactQuery.useInfiniteQuery)\n}\n"],"names":["createInfiniteQuery","options","createBaseQuery","ReactQuery","useInfiniteQuery"],"mappings":";;;AAQO,SAASA,mBAAT,CAMLC,OANK,EAOuD;AAC5D,EAAA,OAAOC,eAAe,CAACD,OAAD,EAAUE,UAAU,CAACC,gBAArB,CAAtB,CAAA;AACD;;;;"}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var createBaseQuery = require('./createBaseQuery.js');
|
|
6
6
|
var utils = require('./utils.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function createInfiniteQuery(options) {
|
|
9
9
|
return createBaseQuery.createBaseQuery(options, utils.ReactQuery.useInfiniteQuery);
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
exports.createInfiniteQuery = createInfiniteQuery;
|
|
13
13
|
//# sourceMappingURL=createInfiniteQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInfiniteQuery.js","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createInfiniteQuery.js","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport function createInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>\n): InfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return createBaseQuery(options, ReactQuery.useInfiniteQuery)\n}\n"],"names":["createInfiniteQuery","options","createBaseQuery","ReactQuery","useInfiniteQuery"],"mappings":";;;;;;;AAQO,SAASA,mBAAT,CAMLC,OANK,EAOuD;AAC5D,EAAA,OAAOC,+BAAe,CAACD,OAAD,EAAUE,gBAAU,CAACC,gBAArB,CAAtB,CAAA;AACD;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.mjs';
|
|
2
2
|
import { ReactQuery } from './utils.mjs';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createInfiniteQuery(options) {
|
|
5
5
|
return createBaseQuery(options, ReactQuery.useInfiniteQuery);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createInfiniteQuery };
|
|
9
9
|
//# sourceMappingURL=createInfiniteQuery.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInfiniteQuery.mjs","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createInfiniteQuery.mjs","sources":["../../src/createInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateInfiniteQueryOptions,\n InfiniteQueryHook,\n} from './types'\nimport { ReactQuery } from './utils'\n\nexport function createInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>\n): InfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return createBaseQuery(options, ReactQuery.useInfiniteQuery)\n}\n"],"names":["createInfiniteQuery","options","createBaseQuery","ReactQuery","useInfiniteQuery"],"mappings":";;;AAQO,SAASA,mBAAT,CAMLC,OANK,EAOuD;AAC5D,EAAA,OAAOC,eAAe,CAACD,OAAD,EAAUE,UAAU,CAACC,gBAArB,CAAtB,CAAA;AACD;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CreateMutationOptions, MutationHook } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { CompatibleError, CreateMutationOptions, MutationHook } from './types';
|
|
2
|
+
export declare function createMutation<TData = unknown, TVariables = void, TError = CompatibleError, TContext = unknown>(defaultOptions: CreateMutationOptions<TData, TVariables, TError, TContext>): MutationHook<TData, TVariables, TError, TContext>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { withMiddleware, ReactQuery } from './utils.esm.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function createMutation(defaultOptions) {
|
|
4
4
|
return Object.assign(withMiddleware(ReactQuery.useMutation, defaultOptions, 'mutations'), {
|
|
5
5
|
getKey: () => defaultOptions.mutationKey,
|
|
6
6
|
getOptions: () => defaultOptions,
|
|
7
7
|
mutationFn: defaultOptions.mutationFn
|
|
8
8
|
});
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
export { createMutation };
|
|
12
12
|
//# sourceMappingURL=createMutation.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMutation.esm.js","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createMutation.esm.js","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport function createMutation<\n TData = unknown,\n TVariables = void,\n TError = CompatibleError,\n TContext = unknown\n>(\n defaultOptions: CreateMutationOptions<TData, TVariables, TError, TContext>\n): MutationHook<TData, TVariables, TError, TContext> {\n return Object.assign(\n withMiddleware(ReactQuery.useMutation, defaultOptions, 'mutations'),\n {\n getKey: () => defaultOptions.mutationKey,\n getOptions: () => defaultOptions,\n mutationFn: defaultOptions.mutationFn,\n }\n ) as MutationHook<TData, TVariables, TError, TContext>\n}\n"],"names":["createMutation","defaultOptions","Object","assign","withMiddleware","ReactQuery","useMutation","getKey","mutationKey","getOptions","mutationFn"],"mappings":";;AAOO,SAASA,cAAT,CAMLC,cANK,EAO8C;AACnD,EAAA,OAAOC,MAAM,CAACC,MAAP,CACLC,cAAc,CAACC,UAAU,CAACC,WAAZ,EAAyBL,cAAzB,EAAyC,WAAzC,CADT,EAEL;AACEM,IAAAA,MAAM,EAAE,MAAMN,cAAc,CAACO,WAD/B;IAEEC,UAAU,EAAE,MAAMR,cAFpB;IAGES,UAAU,EAAET,cAAc,CAACS,UAAAA;AAH7B,GAFK,CAAP,CAAA;AAQD;;;;"}
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var utils = require('./utils.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function createMutation(defaultOptions) {
|
|
8
8
|
return Object.assign(utils.withMiddleware(utils.ReactQuery.useMutation, defaultOptions, 'mutations'), {
|
|
9
9
|
getKey: () => defaultOptions.mutationKey,
|
|
10
10
|
getOptions: () => defaultOptions,
|
|
11
11
|
mutationFn: defaultOptions.mutationFn
|
|
12
12
|
});
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
|
|
15
15
|
exports.createMutation = createMutation;
|
|
16
16
|
//# sourceMappingURL=createMutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMutation.js","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createMutation.js","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport function createMutation<\n TData = unknown,\n TVariables = void,\n TError = CompatibleError,\n TContext = unknown\n>(\n defaultOptions: CreateMutationOptions<TData, TVariables, TError, TContext>\n): MutationHook<TData, TVariables, TError, TContext> {\n return Object.assign(\n withMiddleware(ReactQuery.useMutation, defaultOptions, 'mutations'),\n {\n getKey: () => defaultOptions.mutationKey,\n getOptions: () => defaultOptions,\n mutationFn: defaultOptions.mutationFn,\n }\n ) as MutationHook<TData, TVariables, TError, TContext>\n}\n"],"names":["createMutation","defaultOptions","Object","assign","withMiddleware","ReactQuery","useMutation","getKey","mutationKey","getOptions","mutationFn"],"mappings":";;;;;;AAOO,SAASA,cAAT,CAMLC,cANK,EAO8C;AACnD,EAAA,OAAOC,MAAM,CAACC,MAAP,CACLC,oBAAc,CAACC,gBAAU,CAACC,WAAZ,EAAyBL,cAAzB,EAAyC,WAAzC,CADT,EAEL;AACEM,IAAAA,MAAM,EAAE,MAAMN,cAAc,CAACO,WAD/B;IAEEC,UAAU,EAAE,MAAMR,cAFpB;IAGES,UAAU,EAAET,cAAc,CAACS,UAAAA;AAH7B,GAFK,CAAP,CAAA;AAQD;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { withMiddleware, ReactQuery } from './utils.mjs';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function createMutation(defaultOptions) {
|
|
4
4
|
return Object.assign(withMiddleware(ReactQuery.useMutation, defaultOptions, 'mutations'), {
|
|
5
5
|
getKey: () => defaultOptions.mutationKey,
|
|
6
6
|
getOptions: () => defaultOptions,
|
|
7
7
|
mutationFn: defaultOptions.mutationFn
|
|
8
8
|
});
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
|
|
11
11
|
export { createMutation };
|
|
12
12
|
//# sourceMappingURL=createMutation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMutation.mjs","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createMutation.mjs","sources":["../../src/createMutation.ts"],"sourcesContent":["import type {\n CompatibleError,\n CreateMutationOptions,\n MutationHook,\n} from './types'\nimport { ReactQuery, withMiddleware } from './utils'\n\nexport function createMutation<\n TData = unknown,\n TVariables = void,\n TError = CompatibleError,\n TContext = unknown\n>(\n defaultOptions: CreateMutationOptions<TData, TVariables, TError, TContext>\n): MutationHook<TData, TVariables, TError, TContext> {\n return Object.assign(\n withMiddleware(ReactQuery.useMutation, defaultOptions, 'mutations'),\n {\n getKey: () => defaultOptions.mutationKey,\n getOptions: () => defaultOptions,\n mutationFn: defaultOptions.mutationFn,\n }\n ) as MutationHook<TData, TVariables, TError, TContext>\n}\n"],"names":["createMutation","defaultOptions","Object","assign","withMiddleware","ReactQuery","useMutation","getKey","mutationKey","getOptions","mutationFn"],"mappings":";;AAOO,SAASA,cAAT,CAMLC,cANK,EAO8C;AACnD,EAAA,OAAOC,MAAM,CAACC,MAAP,CACLC,cAAc,CAACC,UAAU,CAACC,WAAZ,EAAyBL,cAAzB,EAAyC,WAAzC,CADT,EAEL;AACEM,IAAAA,MAAM,EAAE,MAAMN,cAAc,CAACO,WAD/B;IAEEC,UAAU,EAAE,MAAMR,cAFpB;IAGES,UAAU,EAAET,cAAc,CAACS,UAAAA;AAH7B,GAFK,CAAP,CAAA;AAQD;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CreateQueryOptions, QueryHook } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { CompatibleError, CreateQueryOptions, QueryHook } from './types';
|
|
2
|
+
export declare function createQuery<TFnData, TVariables = void, TError = CompatibleError>(options: CreateQueryOptions<TFnData, TVariables, TError>): QueryHook<TFnData, TVariables, TError>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.esm.js';
|
|
2
2
|
import { ReactQuery } from './utils.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createQuery(options) {
|
|
5
5
|
return createBaseQuery(options, ReactQuery.useQuery);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createQuery };
|
|
9
9
|
//# sourceMappingURL=createQuery.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createQuery.esm.js","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createQuery.esm.js","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport function createQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateQueryOptions<TFnData, TVariables, TError>\n): QueryHook<TFnData, TVariables, TError> {\n return createBaseQuery(options, ReactQuery.useQuery)\n}\n"],"names":["createQuery","options","createBaseQuery","ReactQuery","useQuery"],"mappings":";;;AAIO,SAASA,WAAT,CAKLC,OALK,EAMmC;AACxC,EAAA,OAAOC,eAAe,CAACD,OAAD,EAAUE,UAAU,CAACC,QAArB,CAAtB,CAAA;AACD;;;;"}
|
package/build/lib/createQuery.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var createBaseQuery = require('./createBaseQuery.js');
|
|
6
6
|
var utils = require('./utils.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function createQuery(options) {
|
|
9
9
|
return createBaseQuery.createBaseQuery(options, utils.ReactQuery.useQuery);
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
exports.createQuery = createQuery;
|
|
13
13
|
//# sourceMappingURL=createQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createQuery.js","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createQuery.js","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport function createQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateQueryOptions<TFnData, TVariables, TError>\n): QueryHook<TFnData, TVariables, TError> {\n return createBaseQuery(options, ReactQuery.useQuery)\n}\n"],"names":["createQuery","options","createBaseQuery","ReactQuery","useQuery"],"mappings":";;;;;;;AAIO,SAASA,WAAT,CAKLC,OALK,EAMmC;AACxC,EAAA,OAAOC,+BAAe,CAACD,OAAD,EAAUE,gBAAU,CAACC,QAArB,CAAtB,CAAA;AACD;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.mjs';
|
|
2
2
|
import { ReactQuery } from './utils.mjs';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createQuery(options) {
|
|
5
5
|
return createBaseQuery(options, ReactQuery.useQuery);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createQuery };
|
|
9
9
|
//# sourceMappingURL=createQuery.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createQuery.mjs","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createQuery.mjs","sources":["../../src/createQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type { CompatibleError, CreateQueryOptions, QueryHook } from './types'\nimport { ReactQuery } from './utils'\n\nexport function createQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateQueryOptions<TFnData, TVariables, TError>\n): QueryHook<TFnData, TVariables, TError> {\n return createBaseQuery(options, ReactQuery.useQuery)\n}\n"],"names":["createQuery","options","createBaseQuery","ReactQuery","useQuery"],"mappings":";;;AAIO,SAASA,WAAT,CAKLC,OALK,EAMmC;AACxC,EAAA,OAAOC,eAAe,CAACD,OAAD,EAAUE,UAAU,CAACC,QAArB,CAAtB,CAAA;AACD;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CreateSuspenseInfiniteQueryOptions, SuspenseInfiniteQueryHook } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { CompatibleError, CreateSuspenseInfiniteQueryOptions, SuspenseInfiniteQueryHook } from './types';
|
|
2
|
+
export declare function createSuspenseInfiniteQuery<TFnData, TVariables = void, TError = CompatibleError, TPageParam = number>(options: CreateSuspenseInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>): SuspenseInfiniteQueryHook<TFnData, TVariables, TError, TPageParam>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.esm.js';
|
|
2
2
|
import { isV5, ReactQuery, suspenseOptions } from './utils.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createSuspenseInfiniteQuery(options) {
|
|
5
5
|
return isV5 ? createBaseQuery(options, ReactQuery.useSuspenseInfiniteQuery) : createBaseQuery(options, ReactQuery.useInfiniteQuery, suspenseOptions);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createSuspenseInfiniteQuery };
|
|
9
9
|
//# sourceMappingURL=createSuspenseInfiniteQuery.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseInfiniteQuery.esm.js","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseInfiniteQuery.esm.js","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateSuspenseInfiniteQueryOptions<\n TFnData,\n TVariables,\n TError,\n TPageParam\n >\n): SuspenseInfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseInfiniteQuery)\n : createBaseQuery(options, ReactQuery.useInfiniteQuery, suspenseOptions)\n}\n"],"names":["createSuspenseInfiniteQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseInfiniteQuery","useInfiniteQuery","suspenseOptions"],"mappings":";;;AAQO,SAASA,2BAAT,CAMLC,OANK,EAY+D;EACpE,OAAOC,IAAI,GACPC,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACC,wBAArB,CADR,GAEPF,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACE,gBAArB,EAAuCC,eAAvC,CAFnB,CAAA;AAGD;;;;"}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var createBaseQuery = require('./createBaseQuery.js');
|
|
6
6
|
var utils = require('./utils.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function createSuspenseInfiniteQuery(options) {
|
|
9
9
|
return utils.isV5 ? createBaseQuery.createBaseQuery(options, utils.ReactQuery.useSuspenseInfiniteQuery) : createBaseQuery.createBaseQuery(options, utils.ReactQuery.useInfiniteQuery, utils.suspenseOptions);
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
exports.createSuspenseInfiniteQuery = createSuspenseInfiniteQuery;
|
|
13
13
|
//# sourceMappingURL=createSuspenseInfiniteQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseInfiniteQuery.js","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseInfiniteQuery.js","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateSuspenseInfiniteQueryOptions<\n TFnData,\n TVariables,\n TError,\n TPageParam\n >\n): SuspenseInfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseInfiniteQuery)\n : createBaseQuery(options, ReactQuery.useInfiniteQuery, suspenseOptions)\n}\n"],"names":["createSuspenseInfiniteQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseInfiniteQuery","useInfiniteQuery","suspenseOptions"],"mappings":";;;;;;;AAQO,SAASA,2BAAT,CAMLC,OANK,EAY+D;EACpE,OAAOC,UAAI,GACPC,+BAAe,CAACF,OAAD,EAAUG,gBAAU,CAACC,wBAArB,CADR,GAEPF,+BAAe,CAACF,OAAD,EAAUG,gBAAU,CAACE,gBAArB,EAAuCC,qBAAvC,CAFnB,CAAA;AAGD;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.mjs';
|
|
2
2
|
import { isV5, ReactQuery, suspenseOptions } from './utils.mjs';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createSuspenseInfiniteQuery(options) {
|
|
5
5
|
return isV5 ? createBaseQuery(options, ReactQuery.useSuspenseInfiniteQuery) : createBaseQuery(options, ReactQuery.useInfiniteQuery, suspenseOptions);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createSuspenseInfiniteQuery };
|
|
9
9
|
//# sourceMappingURL=createSuspenseInfiniteQuery.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseInfiniteQuery.mjs","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseInfiniteQuery.mjs","sources":["../../src/createSuspenseInfiniteQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseInfiniteQueryOptions,\n SuspenseInfiniteQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseInfiniteQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError,\n TPageParam = number\n>(\n options: CreateSuspenseInfiniteQueryOptions<\n TFnData,\n TVariables,\n TError,\n TPageParam\n >\n): SuspenseInfiniteQueryHook<TFnData, TVariables, TError, TPageParam> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseInfiniteQuery)\n : createBaseQuery(options, ReactQuery.useInfiniteQuery, suspenseOptions)\n}\n"],"names":["createSuspenseInfiniteQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseInfiniteQuery","useInfiniteQuery","suspenseOptions"],"mappings":";;;AAQO,SAASA,2BAAT,CAMLC,OANK,EAY+D;EACpE,OAAOC,IAAI,GACPC,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACC,wBAArB,CADR,GAEPF,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACE,gBAArB,EAAuCC,eAAvC,CAFnB,CAAA;AAGD;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CreateSuspenseQueryOptions, SuspenseQueryHook } from './types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { CompatibleError, CreateSuspenseQueryOptions, SuspenseQueryHook } from './types';
|
|
2
|
+
export declare function createSuspenseQuery<TFnData, TVariables = void, TError = CompatibleError>(options: CreateSuspenseQueryOptions<TFnData, TVariables, TError>): SuspenseQueryHook<TFnData, TVariables, TError>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.esm.js';
|
|
2
2
|
import { isV5, ReactQuery, suspenseOptions } from './utils.esm.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createSuspenseQuery(options) {
|
|
5
5
|
return isV5 ? createBaseQuery(options, ReactQuery.useSuspenseQuery) : createBaseQuery(options, ReactQuery.useQuery, suspenseOptions);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createSuspenseQuery };
|
|
9
9
|
//# sourceMappingURL=createSuspenseQuery.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseQuery.esm.js","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseQuery.esm.js","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateSuspenseQueryOptions<TFnData, TVariables, TError>\n): SuspenseQueryHook<TFnData, TVariables, TError> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseQuery)\n : createBaseQuery(options, ReactQuery.useQuery, suspenseOptions)\n}\n"],"names":["createSuspenseQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseQuery","useQuery","suspenseOptions"],"mappings":";;;AAQO,SAASA,mBAAT,CAKLC,OALK,EAM2C;EAChD,OAAOC,IAAI,GACPC,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACC,gBAArB,CADR,GAEPF,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACE,QAArB,EAA+BC,eAA/B,CAFnB,CAAA;AAGD;;;;"}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var createBaseQuery = require('./createBaseQuery.js');
|
|
6
6
|
var utils = require('./utils.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function createSuspenseQuery(options) {
|
|
9
9
|
return utils.isV5 ? createBaseQuery.createBaseQuery(options, utils.ReactQuery.useSuspenseQuery) : createBaseQuery.createBaseQuery(options, utils.ReactQuery.useQuery, utils.suspenseOptions);
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
exports.createSuspenseQuery = createSuspenseQuery;
|
|
13
13
|
//# sourceMappingURL=createSuspenseQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseQuery.js","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseQuery.js","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateSuspenseQueryOptions<TFnData, TVariables, TError>\n): SuspenseQueryHook<TFnData, TVariables, TError> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseQuery)\n : createBaseQuery(options, ReactQuery.useQuery, suspenseOptions)\n}\n"],"names":["createSuspenseQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseQuery","useQuery","suspenseOptions"],"mappings":";;;;;;;AAQO,SAASA,mBAAT,CAKLC,OALK,EAM2C;EAChD,OAAOC,UAAI,GACPC,+BAAe,CAACF,OAAD,EAAUG,gBAAU,CAACC,gBAArB,CADR,GAEPF,+BAAe,CAACF,OAAD,EAAUG,gBAAU,CAACE,QAArB,EAA+BC,qBAA/B,CAFnB,CAAA;AAGD;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createBaseQuery } from './createBaseQuery.mjs';
|
|
2
2
|
import { isV5, ReactQuery, suspenseOptions } from './utils.mjs';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function createSuspenseQuery(options) {
|
|
5
5
|
return isV5 ? createBaseQuery(options, ReactQuery.useSuspenseQuery) : createBaseQuery(options, ReactQuery.useQuery, suspenseOptions);
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
8
|
export { createSuspenseQuery };
|
|
9
9
|
//# sourceMappingURL=createSuspenseQuery.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspenseQuery.mjs","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport
|
|
1
|
+
{"version":3,"file":"createSuspenseQuery.mjs","sources":["../../src/createSuspenseQuery.ts"],"sourcesContent":["import { createBaseQuery } from './createBaseQuery'\nimport type {\n CompatibleError,\n CreateSuspenseQueryOptions,\n SuspenseQueryHook,\n} from './types'\nimport { ReactQuery, isV5, suspenseOptions } from './utils'\n\nexport function createSuspenseQuery<\n TFnData,\n TVariables = void,\n TError = CompatibleError\n>(\n options: CreateSuspenseQueryOptions<TFnData, TVariables, TError>\n): SuspenseQueryHook<TFnData, TVariables, TError> {\n return isV5\n ? createBaseQuery(options, ReactQuery.useSuspenseQuery)\n : createBaseQuery(options, ReactQuery.useQuery, suspenseOptions)\n}\n"],"names":["createSuspenseQuery","options","isV5","createBaseQuery","ReactQuery","useSuspenseQuery","useQuery","suspenseOptions"],"mappings":";;;AAQO,SAASA,mBAAT,CAKLC,OALK,EAM2C;EAChD,OAAOC,IAAI,GACPC,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACC,gBAArB,CADR,GAEPF,eAAe,CAACF,OAAD,EAAUG,UAAU,CAACE,QAArB,EAA+BC,eAA/B,CAFnB,CAAA;AAGD;;;;"}
|
package/build/lib/router.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { QueryKey } from '@tanstack/react-query';
|
|
2
|
-
import type { CreateRouter, RouterConfig, RouterInfiniteQuery, RouterInfiniteQueryOptions, RouterMutation, RouterMutationOptions, RouterQuery, RouterQueryOptions } from './types';
|
|
2
|
+
import type { CompatibleError, CreateRouter, RouterConfig, RouterInfiniteQuery, RouterInfiniteQueryOptions, RouterMutation, RouterMutationOptions, RouterQuery, RouterQueryOptions } from './types';
|
|
3
3
|
export declare const router: {
|
|
4
4
|
<TConfig extends RouterConfig>(key: string | QueryKey, config: TConfig): CreateRouter<TConfig>;
|
|
5
|
-
query
|
|
6
|
-
infiniteQuery
|
|
7
|
-
mutation
|
|
5
|
+
query: typeof query;
|
|
6
|
+
infiniteQuery: typeof infiniteQuery;
|
|
7
|
+
mutation: typeof mutation;
|
|
8
8
|
};
|
|
9
|
+
declare function query<TFnData, TVariables = void, TError = CompatibleError>(options: RouterQueryOptions<TFnData, TVariables, TError>): RouterQuery<TFnData, TVariables, TError>;
|
|
10
|
+
declare function infiniteQuery<TFnData, TVariables = void, TError = CompatibleError, TPageParam = number>(options: RouterInfiniteQueryOptions<TFnData, TVariables, TError, TPageParam>): RouterInfiniteQuery<TFnData, TVariables, TError, TPageParam>;
|
|
11
|
+
declare function mutation<TFnData = unknown, TVariables = void, TError = CompatibleError, TContext = unknown>(options: RouterMutationOptions<TFnData, TVariables, TError, TContext>): RouterMutation<TFnData, TVariables, TError, TContext>;
|
|
12
|
+
export {};
|