@openapi-qraft/react 2.15.0-beta.7 → 2.15.0-beta.8
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/CHANGELOG.md +26 -0
- package/dist/cjs/callbacks/operationInvokeFn.cjs +4 -1
- package/dist/cjs/callbacks/operationInvokeFn.cjs.map +1 -1
- package/dist/cjs/callbacks/useMutation.cjs +16 -5
- package/dist/cjs/callbacks/useMutation.cjs.map +1 -1
- package/dist/cjs/callbacks/useQueries.cjs +5 -4
- package/dist/cjs/callbacks/useQueries.cjs.map +1 -1
- package/dist/cjs/callbacks/useSuspenseQueries.cjs +5 -4
- package/dist/cjs/callbacks/useSuspenseQueries.cjs.map +1 -1
- package/dist/cjs/lib/callQueryClientFetchMethod.cjs +5 -4
- package/dist/cjs/lib/callQueryClientFetchMethod.cjs.map +1 -1
- package/dist/cjs/lib/createRequestFnInfo.cjs +17 -0
- package/dist/cjs/lib/createRequestFnInfo.cjs.map +1 -0
- package/dist/cjs/lib/requestFn.cjs +1 -1
- package/dist/cjs/lib/requestFn.cjs.map +1 -1
- package/dist/cjs/lib/useComposeUseQueryOptions.cjs +5 -4
- package/dist/cjs/lib/useComposeUseQueryOptions.cjs.map +1 -1
- package/dist/cjs/qraftReactAPIClient.cjs.map +1 -1
- package/dist/esm/callbacks/operationInvokeFn.js +4 -1
- package/dist/esm/callbacks/operationInvokeFn.js.map +1 -1
- package/dist/esm/callbacks/useMutation.js +16 -5
- package/dist/esm/callbacks/useMutation.js.map +1 -1
- package/dist/esm/callbacks/useQueries.js +5 -4
- package/dist/esm/callbacks/useQueries.js.map +1 -1
- package/dist/esm/callbacks/useSuspenseQueries.js +5 -4
- package/dist/esm/callbacks/useSuspenseQueries.js.map +1 -1
- package/dist/esm/lib/callQueryClientFetchMethod.js +5 -4
- package/dist/esm/lib/callQueryClientFetchMethod.js.map +1 -1
- package/dist/esm/lib/createRequestFnInfo.js +15 -0
- package/dist/esm/lib/createRequestFnInfo.js.map +1 -0
- package/dist/esm/lib/requestFn.js +1 -1
- package/dist/esm/lib/requestFn.js.map +1 -1
- package/dist/esm/lib/useComposeUseQueryOptions.js +5 -4
- package/dist/esm/lib/useComposeUseQueryOptions.js.map +1 -1
- package/dist/esm/qraftReactAPIClient.js.map +1 -1
- package/dist/types/callbacks/operationInvokeFn.d.ts.map +1 -1
- package/dist/types/callbacks/useMutation.d.ts.map +1 -1
- package/dist/types/callbacks/useQueries.d.ts.map +1 -1
- package/dist/types/callbacks/useSuspenseQueries.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/callQueryClientFetchMethod.d.ts.map +1 -1
- package/dist/types/lib/createRequestFnInfo.d.ts +4 -0
- package/dist/types/lib/createRequestFnInfo.d.ts.map +1 -0
- package/dist/types/lib/requestFn.d.ts.map +1 -1
- package/dist/types/lib/useComposeUseQueryOptions.d.ts.map +1 -1
- package/dist/types/qraftReactAPIClient.d.ts +28 -44
- package/dist/types/qraftReactAPIClient.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/callbacks/operationInvokeFn.ts +3 -0
- package/src/callbacks/useMutation.ts +14 -1
- package/src/callbacks/useQueries.ts +20 -9
- package/src/callbacks/useSuspenseQueries.ts +16 -8
- package/src/index.ts +5 -1
- package/src/lib/callQueryClientFetchMethod.ts +17 -10
- package/src/lib/createRequestFnInfo.ts +22 -0
- package/src/lib/requestFn.ts +7 -1
- package/src/lib/useComposeUseQueryOptions.ts +16 -13
- package/src/qraftReactAPIClient.ts +112 -57
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { QueryClient } from '@tanstack/react-query';
|
|
1
|
+
import type { QueryClient, QueryFunctionContext } from '@tanstack/react-query';
|
|
2
2
|
import type { CreateAPIQueryClientOptions } from '../qraftAPIClient.js';
|
|
3
3
|
import type { OperationSchema, RequestFn } from './requestFn.js';
|
|
4
4
|
import { composeInfiniteQueryKey } from './composeInfiniteQueryKey.js';
|
|
5
5
|
import { composeQueryKey } from './composeQueryKey.js';
|
|
6
|
+
import { createQueryRequestFnInfo } from './createRequestFnInfo.js';
|
|
6
7
|
import { prepareRequestFnParameters } from './prepareRequestFnParameters.js';
|
|
7
8
|
import { requestFnResponseRejecter } from './requestFnResponseRejecter.js';
|
|
8
9
|
import { requestFnResponseResolver } from './requestFnResponseResolver.js';
|
|
@@ -48,21 +49,27 @@ export function callQueryClientMethodWithQueryKey<
|
|
|
48
49
|
const queryFn =
|
|
49
50
|
queryFnOption ??
|
|
50
51
|
(requestFn
|
|
51
|
-
?
|
|
52
|
-
|
|
52
|
+
? function (context: QueryFunctionContext) {
|
|
53
|
+
const {
|
|
54
|
+
queryKey: [, queryParams],
|
|
55
|
+
meta,
|
|
56
|
+
pageParam,
|
|
57
|
+
} = context;
|
|
53
58
|
const { parameters, body } = prepareRequestFnParameters(
|
|
54
59
|
queryParams,
|
|
55
60
|
pageParam,
|
|
56
61
|
infinite
|
|
57
62
|
);
|
|
58
63
|
|
|
59
|
-
return requestFn(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
return requestFn(
|
|
65
|
+
schema,
|
|
66
|
+
createQueryRequestFnInfo(context, {
|
|
67
|
+
parameters: parameters as never,
|
|
68
|
+
baseUrl,
|
|
69
|
+
body,
|
|
70
|
+
meta,
|
|
71
|
+
})
|
|
72
|
+
).then(requestFnResponseResolver, requestFnResponseRejecter);
|
|
66
73
|
}
|
|
67
74
|
: undefined);
|
|
68
75
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RequestFnInfo } from '@openapi-qraft/tanstack-query-react-types';
|
|
2
|
+
import type { QueryFunctionContext } from '@tanstack/react-query';
|
|
3
|
+
|
|
4
|
+
export function createQueryRequestFnInfo(
|
|
5
|
+
context: QueryFunctionContext,
|
|
6
|
+
requestInfo: Omit<RequestFnInfo, 'signal' | 'source'>
|
|
7
|
+
): RequestFnInfo {
|
|
8
|
+
return Object.defineProperty(
|
|
9
|
+
{
|
|
10
|
+
...requestInfo,
|
|
11
|
+
source: {
|
|
12
|
+
type: 'query',
|
|
13
|
+
context,
|
|
14
|
+
},
|
|
15
|
+
} satisfies Omit<RequestFnInfo, 'signal'>,
|
|
16
|
+
'signal',
|
|
17
|
+
{
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => context.signal,
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
package/src/lib/requestFn.ts
CHANGED
|
@@ -53,7 +53,13 @@ export async function baseRequestFn<TData, TError>(
|
|
|
53
53
|
requestInfo: RequestFnInfo,
|
|
54
54
|
options: WithRequired<RequestFnOptions, 'urlSerializer' | 'bodySerializer'>
|
|
55
55
|
): Promise<RequestFnResponse<TData, TError>> {
|
|
56
|
-
const {
|
|
56
|
+
const {
|
|
57
|
+
parameters,
|
|
58
|
+
headers,
|
|
59
|
+
body,
|
|
60
|
+
source: _source,
|
|
61
|
+
...requestInfoRest
|
|
62
|
+
} = requestInfo;
|
|
57
63
|
|
|
58
64
|
const requestPayload = options.bodySerializer(requestSchema, body);
|
|
59
65
|
|
|
@@ -14,6 +14,7 @@ import type { OperationSchema } from './requestFn.js';
|
|
|
14
14
|
import { useMemo } from 'react';
|
|
15
15
|
import { composeInfiniteQueryKey } from './composeInfiniteQueryKey.js';
|
|
16
16
|
import { composeQueryKey } from './composeQueryKey.js';
|
|
17
|
+
import { createQueryRequestFnInfo } from './createRequestFnInfo.js';
|
|
17
18
|
import { prepareRequestFnParameters } from './prepareRequestFnParameters.js';
|
|
18
19
|
import { requestFnResponseRejecter } from './requestFnResponseRejecter.js';
|
|
19
20
|
import { requestFnResponseResolver } from './requestFnResponseResolver.js';
|
|
@@ -53,29 +54,31 @@ export function useComposeUseQueryOptions(
|
|
|
53
54
|
function qraftQueryFn(
|
|
54
55
|
requestFn: CreateAPIQueryClientOptions['requestFn'],
|
|
55
56
|
baseUrl: CreateAPIQueryClientOptions['baseUrl'],
|
|
56
|
-
|
|
57
|
-
queryKey: [schema, queryParams],
|
|
58
|
-
signal,
|
|
59
|
-
meta,
|
|
60
|
-
pageParam,
|
|
61
|
-
}: QueryFunctionContext<
|
|
57
|
+
context: QueryFunctionContext<
|
|
62
58
|
| ServiceOperationQueryKey<OperationSchema, unknown>
|
|
63
59
|
| ServiceOperationInfiniteQueryKey<OperationSchema, unknown>
|
|
64
60
|
>
|
|
65
61
|
) {
|
|
62
|
+
const {
|
|
63
|
+
queryKey: [schema, queryParams],
|
|
64
|
+
meta,
|
|
65
|
+
pageParam,
|
|
66
|
+
} = context;
|
|
66
67
|
const { parameters, body } = prepareRequestFnParameters(
|
|
67
68
|
queryParams,
|
|
68
69
|
pageParam,
|
|
69
70
|
Boolean('infinite' in schema && schema.infinite)
|
|
70
71
|
);
|
|
71
72
|
|
|
72
|
-
return requestFn(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
return requestFn(
|
|
74
|
+
schema,
|
|
75
|
+
createQueryRequestFnInfo(context, {
|
|
76
|
+
parameters: parameters as never,
|
|
77
|
+
baseUrl,
|
|
78
|
+
body,
|
|
79
|
+
meta,
|
|
80
|
+
})
|
|
81
|
+
).then(requestFnResponseResolver, requestFnResponseRejecter);
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
type UseQueryOptionsArgs = [
|
|
@@ -4,11 +4,6 @@ import type { Context } from 'react';
|
|
|
4
4
|
import type * as callbacks from './callbacks/index.js';
|
|
5
5
|
import type { OperationSchema } from './lib/requestFn.js';
|
|
6
6
|
import type {
|
|
7
|
-
APIBasicClientServices,
|
|
8
|
-
APIBasicQueryClientServices,
|
|
9
|
-
APIDefaultQueryClientServices,
|
|
10
|
-
APIQueryClientServices,
|
|
11
|
-
APIUtilityClientServices,
|
|
12
7
|
CreateAPIBasicClientOptions,
|
|
13
8
|
CreateAPIBasicQueryClientOptions,
|
|
14
9
|
CreateAPIClientOptions,
|
|
@@ -27,8 +22,8 @@ type ServiceMethods = typeof callbacks;
|
|
|
27
22
|
type PartialServiceMethods = Partial<ServiceMethods>;
|
|
28
23
|
|
|
29
24
|
/**
|
|
30
|
-
* Creates a QueryClient compatible API Client which contains all
|
|
31
|
-
*
|
|
25
|
+
* Creates a QueryClient compatible API Client which contains all non-hook
|
|
26
|
+
* methods with request and QueryClient options bound.
|
|
32
27
|
*
|
|
33
28
|
* @example Fetching data with QueryClient
|
|
34
29
|
* ```ts
|
|
@@ -49,10 +44,8 @@ export function qraftReactAPIClient<
|
|
|
49
44
|
>(
|
|
50
45
|
services: Services,
|
|
51
46
|
callbacks: Callbacks,
|
|
52
|
-
options:
|
|
53
|
-
|
|
54
|
-
| Context<CreateAPIQueryClientOptions | undefined>
|
|
55
|
-
): APIDefaultQueryClientServices<Services>;
|
|
47
|
+
options: CreateAPIQueryClientOptions
|
|
48
|
+
): APIQueryClientMethodsServices<Services, Callbacks>;
|
|
56
49
|
|
|
57
50
|
/**
|
|
58
51
|
* It creates a QueryClient-compatible API client that contains all the hooks
|
|
@@ -75,11 +68,11 @@ export function qraftReactAPIClient<
|
|
|
75
68
|
services: Services,
|
|
76
69
|
callbacks: Callbacks,
|
|
77
70
|
options: Context<CreateAPIQueryClientOptions | undefined>
|
|
78
|
-
):
|
|
71
|
+
): APIQueryClientHooksServices<Services, Callbacks>;
|
|
79
72
|
|
|
80
73
|
/**
|
|
81
|
-
* Creates a QueryClient compatible API Client which contains all
|
|
82
|
-
*
|
|
74
|
+
* Creates a QueryClient compatible API Client which contains all non-hook
|
|
75
|
+
* methods with request and QueryClient options bound.
|
|
83
76
|
*
|
|
84
77
|
* @example Fetching data with QueryClient
|
|
85
78
|
* ```ts
|
|
@@ -101,12 +94,12 @@ export function qraftReactAPIClient<
|
|
|
101
94
|
services: Services,
|
|
102
95
|
callbacks: Callbacks,
|
|
103
96
|
options: CreateAPIQueryClientOptions
|
|
104
|
-
):
|
|
97
|
+
): APIQueryClientMethodsServices<Services, Callbacks>;
|
|
105
98
|
|
|
106
99
|
/**
|
|
107
|
-
* Creates a QueryClient compatible API Client which contains
|
|
108
|
-
*
|
|
109
|
-
* `
|
|
100
|
+
* Creates a QueryClient compatible API Client which contains non-hook state
|
|
101
|
+
* management methods such as `setQueryData`, `getQueryData` and
|
|
102
|
+
* `invalidateQueries`.
|
|
110
103
|
*
|
|
111
104
|
* @example Invalidating queries with QueryClient
|
|
112
105
|
* ```ts
|
|
@@ -126,28 +119,12 @@ export function qraftReactAPIClient<
|
|
|
126
119
|
services: Services,
|
|
127
120
|
callbacks: Callbacks,
|
|
128
121
|
options: CreateAPIBasicQueryClientOptions
|
|
129
|
-
):
|
|
122
|
+
): APIBasicQueryClientMethodsServices<Services, Callbacks>;
|
|
130
123
|
|
|
131
124
|
/**
|
|
132
|
-
* Creates a basic API Client which contains
|
|
133
|
-
* that don't require an explicitly provided QueryClient.
|
|
134
|
-
* Hooks like `useQuery` and `useMutation` will automatically retrieve
|
|
135
|
-
* the QueryClient from the `<QueryClientProvider />` context.
|
|
136
|
-
*
|
|
137
|
-
* @example Fetching data with QueryClient from context
|
|
138
|
-
* ```ts
|
|
139
|
-
* const api = qraftReactAPIClient(services, callbacks, {
|
|
140
|
-
* requestFn: requestFn,
|
|
141
|
-
* baseUrl: 'https://api.example.com',
|
|
142
|
-
* });
|
|
125
|
+
* Creates a basic API Client which contains operation invoke and key helpers.
|
|
143
126
|
*
|
|
144
|
-
*
|
|
145
|
-
* api.service.operation.useQuery({
|
|
146
|
-
* parameters: { path: { id: 1 } },
|
|
147
|
-
* });
|
|
148
|
-
* ```
|
|
149
|
-
*
|
|
150
|
-
* @example Fetching data without QueryClient
|
|
127
|
+
* @example Fetching data
|
|
151
128
|
* ```ts
|
|
152
129
|
* const api = qraftReactAPIClient(services, callbacks, {
|
|
153
130
|
* requestFn: requestFn,
|
|
@@ -166,20 +143,11 @@ export function qraftReactAPIClient<
|
|
|
166
143
|
services: Services,
|
|
167
144
|
callbacks: Callbacks,
|
|
168
145
|
options: CreateAPIBasicClientOptions
|
|
169
|
-
):
|
|
146
|
+
): APIBasicClientMethodsServices<Services, Callbacks>;
|
|
170
147
|
|
|
171
148
|
/**
|
|
172
|
-
* Creates a utility API Client which contains
|
|
173
|
-
*
|
|
174
|
-
* like `useIsFetching` and `useMutationData`.
|
|
175
|
-
*
|
|
176
|
-
* @example Using state hooks
|
|
177
|
-
* ```ts
|
|
178
|
-
* const api = qraftReactAPIClient(services, callbacks);
|
|
179
|
-
*
|
|
180
|
-
* // Check if any query is currently fetching
|
|
181
|
-
* const isFetching = api.service.operation.useIsFetching();
|
|
182
|
-
* ```
|
|
149
|
+
* Creates a utility API Client which contains key helper operations such as
|
|
150
|
+
* `getQueryKey`, `getInfiniteQueryKey` and `getMutationKey`.
|
|
183
151
|
*
|
|
184
152
|
* @example Getting query keys with utility client
|
|
185
153
|
* ```ts
|
|
@@ -192,11 +160,11 @@ export function qraftReactAPIClient<
|
|
|
192
160
|
*/
|
|
193
161
|
export function qraftReactAPIClient<
|
|
194
162
|
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
195
|
-
Callbacks extends
|
|
163
|
+
Callbacks extends PartialServiceMethods,
|
|
196
164
|
>(
|
|
197
165
|
services: Services,
|
|
198
166
|
callbacks: Callbacks
|
|
199
|
-
):
|
|
167
|
+
): APIUtilityClientMethodsServices<Services, Callbacks>;
|
|
200
168
|
|
|
201
169
|
export function qraftReactAPIClient<
|
|
202
170
|
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
@@ -208,11 +176,11 @@ export function qraftReactAPIClient<
|
|
|
208
176
|
| CreateAPIClientOptions
|
|
209
177
|
| Context<CreateAPIQueryClientOptions | undefined>
|
|
210
178
|
):
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
179
|
+
| APIQueryClientMethodsServices<Services, Callbacks>
|
|
180
|
+
| APIBasicQueryClientMethodsServices<Services, Callbacks>
|
|
181
|
+
| APIBasicClientMethodsServices<Services, Callbacks>
|
|
182
|
+
| APIUtilityClientMethodsServices<Services, Callbacks>
|
|
183
|
+
| APIQueryClientHooksServices<Services, Callbacks> {
|
|
216
184
|
if (options && 'Provider' in options && 'Consumer' in options) {
|
|
217
185
|
const wrappedCallbacks = wrapHookCallbacks(callbacks, options);
|
|
218
186
|
return qraftAPIClient(services, wrappedCallbacks) as never;
|
|
@@ -259,7 +227,7 @@ function wrapHookCallbackWithUseContext(
|
|
|
259
227
|
return useCallbackContext;
|
|
260
228
|
}
|
|
261
229
|
|
|
262
|
-
export type
|
|
230
|
+
export type APIQueryClientHooksServices<
|
|
263
231
|
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
264
232
|
Callbacks extends PartialServiceMethods,
|
|
265
233
|
> = ServicesFilteredByCallbacks<
|
|
@@ -271,3 +239,90 @@ type HookOperationCallbackList =
|
|
|
271
239
|
| UtilityOperationCallbacks
|
|
272
240
|
| QueryOperationHookCallbacks
|
|
273
241
|
| MutationOperationHookCallbacks;
|
|
242
|
+
|
|
243
|
+
export type APIUtilityClientMethodsServices<
|
|
244
|
+
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
245
|
+
Callbacks extends PartialServiceMethods,
|
|
246
|
+
> = ServicesFilteredByCallbacks<
|
|
247
|
+
Services,
|
|
248
|
+
Extract<keyof Callbacks, KeyOperationCallbacks>
|
|
249
|
+
>;
|
|
250
|
+
|
|
251
|
+
export type APIBasicClientMethodsServices<
|
|
252
|
+
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
253
|
+
Callbacks extends PartialServiceMethods,
|
|
254
|
+
> = ServicesFilteredByCallbacks<
|
|
255
|
+
Services,
|
|
256
|
+
Extract<keyof Callbacks, InvokeOperationCallback | KeyOperationCallbacks>
|
|
257
|
+
>;
|
|
258
|
+
|
|
259
|
+
export type APIBasicQueryClientMethodsServices<
|
|
260
|
+
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
261
|
+
Callbacks extends PartialServiceMethods,
|
|
262
|
+
> = ServicesFilteredByCallbacks<
|
|
263
|
+
Services,
|
|
264
|
+
Extract<
|
|
265
|
+
keyof Callbacks,
|
|
266
|
+
| QueryOperationStateMethodCallbacks
|
|
267
|
+
| MutationOperationStateMethodCallbacks
|
|
268
|
+
| KeyOperationCallbacks
|
|
269
|
+
>
|
|
270
|
+
>;
|
|
271
|
+
|
|
272
|
+
export type APIQueryClientMethodsServices<
|
|
273
|
+
Services extends UnionServiceOperationsDeclaration<Services>,
|
|
274
|
+
Callbacks extends PartialServiceMethods,
|
|
275
|
+
> = ServicesFilteredByCallbacks<
|
|
276
|
+
Services,
|
|
277
|
+
Extract<
|
|
278
|
+
keyof Callbacks,
|
|
279
|
+
| QueryOperationMethodCallbacks
|
|
280
|
+
| QueryOperationStateMethodCallbacks
|
|
281
|
+
| MutationOperationStateMethodCallbacks
|
|
282
|
+
| InvokeOperationCallback
|
|
283
|
+
| KeyOperationCallbacks
|
|
284
|
+
>
|
|
285
|
+
>;
|
|
286
|
+
|
|
287
|
+
type QueryOperationMethodCallbacks = Extract<
|
|
288
|
+
keyof ServiceMethods,
|
|
289
|
+
| 'fetchInfiniteQuery'
|
|
290
|
+
| 'fetchQuery'
|
|
291
|
+
| 'prefetchInfiniteQuery'
|
|
292
|
+
| 'prefetchQuery'
|
|
293
|
+
| 'refetchQueries'
|
|
294
|
+
| 'ensureQueryData'
|
|
295
|
+
| 'ensureInfiniteQueryData'
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type QueryOperationStateMethodCallbacks = Extract<
|
|
299
|
+
keyof ServiceMethods,
|
|
300
|
+
| 'cancelQueries'
|
|
301
|
+
| 'getInfiniteQueryData'
|
|
302
|
+
| 'getInfiniteQueryState'
|
|
303
|
+
| 'getQueriesData'
|
|
304
|
+
| 'getQueryData'
|
|
305
|
+
| 'getQueryState'
|
|
306
|
+
| 'invalidateQueries'
|
|
307
|
+
| 'isFetching'
|
|
308
|
+
| 'removeQueries'
|
|
309
|
+
| 'resetQueries'
|
|
310
|
+
| 'setInfiniteQueryData'
|
|
311
|
+
| 'setQueriesData'
|
|
312
|
+
| 'setQueryData'
|
|
313
|
+
>;
|
|
314
|
+
|
|
315
|
+
type MutationOperationStateMethodCallbacks = Extract<
|
|
316
|
+
keyof ServiceMethods,
|
|
317
|
+
'getMutationCache' | 'isMutating'
|
|
318
|
+
>;
|
|
319
|
+
|
|
320
|
+
type InvokeOperationCallback = Extract<
|
|
321
|
+
keyof ServiceMethods,
|
|
322
|
+
'operationInvokeFn'
|
|
323
|
+
>;
|
|
324
|
+
|
|
325
|
+
type KeyOperationCallbacks = Extract<
|
|
326
|
+
keyof ServiceMethods,
|
|
327
|
+
'getQueryKey' | 'getInfiniteQueryKey' | 'getMutationKey'
|
|
328
|
+
>;
|