@apollo/client 4.2.0-alpha.5 → 4.2.0-alpha.7
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 +33 -0
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +29 -2
- package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useBackgroundQuery.d.cts +1019 -19
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.d.cts +115 -7
- package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLoadableQuery.d.cts +195 -8
- package/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/__cjs/react/hooks/useMutation.d.cts +20 -9
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.d.cts +280 -11
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.d.cts +405 -13
- package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/__cjs/react/query-preloader/createQueryPreloader.d.cts +395 -123
- package/__cjs/version.cjs +1 -1
- package/core/ApolloClient.d.ts +29 -2
- package/core/ApolloClient.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +1019 -19
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +115 -7
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.d.ts +195 -8
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +20 -9
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +280 -11
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +405 -13
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/useBackgroundQuery.d.ts +1019 -19
- package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.d.ts +115 -7
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLoadableQuery.d.ts +195 -8
- package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
- package/react/hooks-compiled/useMutation.d.ts +20 -9
- package/react/hooks-compiled/useMutation.js.map +1 -1
- package/react/hooks-compiled/useQuery.d.ts +280 -11
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.d.ts +405 -13
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/react/query-preloader/createQueryPreloader.d.ts +395 -123
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/version.js +1 -1
|
@@ -236,10 +236,6 @@ export declare namespace useLoadableQuery {
|
|
|
236
236
|
}
|
|
237
237
|
namespace Signatures {
|
|
238
238
|
/**
|
|
239
|
-
* @deprecated Avoid manually specifying generics on `useLoadableQuery`.
|
|
240
|
-
* Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
239
|
* A hook for imperatively loading a query, such as responding to a user
|
|
244
240
|
* interaction.
|
|
245
241
|
*
|
|
@@ -285,6 +281,197 @@ export declare namespace useLoadableQuery {
|
|
|
285
281
|
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
286
282
|
*/
|
|
287
283
|
interface Classic {
|
|
284
|
+
/**
|
|
285
|
+
* A hook for imperatively loading a query, such as responding to a user
|
|
286
|
+
* interaction.
|
|
287
|
+
*
|
|
288
|
+
* > Refer to the [Suspense - Fetching in response to user interaction](https://www.apollographql.com/docs/react/data/suspense#fetching-in-response-to-user-interaction) section for a more in-depth overview of `useLoadableQuery`.
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
*
|
|
292
|
+
* ```jsx
|
|
293
|
+
* import { gql, useLoadableQuery } from "@apollo/client";
|
|
294
|
+
*
|
|
295
|
+
* const GET_GREETING = gql`
|
|
296
|
+
* query GetGreeting($language: String!) {
|
|
297
|
+
* greeting(language: $language) {
|
|
298
|
+
* message
|
|
299
|
+
* }
|
|
300
|
+
* }
|
|
301
|
+
* `;
|
|
302
|
+
*
|
|
303
|
+
* function App() {
|
|
304
|
+
* const [loadGreeting, queryRef] = useLoadableQuery(GET_GREETING);
|
|
305
|
+
*
|
|
306
|
+
* return (
|
|
307
|
+
* <>
|
|
308
|
+
* <button onClick={() => loadGreeting({ language: "english" })}>
|
|
309
|
+
* Load greeting
|
|
310
|
+
* </button>
|
|
311
|
+
* <Suspense fallback={<div>Loading...</div>}>
|
|
312
|
+
* {queryRef && <Hello queryRef={queryRef} />}
|
|
313
|
+
* </Suspense>
|
|
314
|
+
* </>
|
|
315
|
+
* );
|
|
316
|
+
* }
|
|
317
|
+
*
|
|
318
|
+
* function Hello({ queryRef }) {
|
|
319
|
+
* const { data } = useReadQuery(queryRef);
|
|
320
|
+
*
|
|
321
|
+
* return <div>{data.greeting.message}</div>;
|
|
322
|
+
* }
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* @param query - A GraphQL query document parsed into an AST by `gql`.
|
|
326
|
+
* @param options - Options to control how the query is executed.
|
|
327
|
+
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
328
|
+
*/
|
|
329
|
+
<TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
330
|
+
returnPartialData: true;
|
|
331
|
+
errorPolicy: "ignore" | "all";
|
|
332
|
+
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "partial" | "empty">;
|
|
333
|
+
/**
|
|
334
|
+
* A hook for imperatively loading a query, such as responding to a user
|
|
335
|
+
* interaction.
|
|
336
|
+
*
|
|
337
|
+
* > Refer to the [Suspense - Fetching in response to user interaction](https://www.apollographql.com/docs/react/data/suspense#fetching-in-response-to-user-interaction) section for a more in-depth overview of `useLoadableQuery`.
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
*
|
|
341
|
+
* ```jsx
|
|
342
|
+
* import { gql, useLoadableQuery } from "@apollo/client";
|
|
343
|
+
*
|
|
344
|
+
* const GET_GREETING = gql`
|
|
345
|
+
* query GetGreeting($language: String!) {
|
|
346
|
+
* greeting(language: $language) {
|
|
347
|
+
* message
|
|
348
|
+
* }
|
|
349
|
+
* }
|
|
350
|
+
* `;
|
|
351
|
+
*
|
|
352
|
+
* function App() {
|
|
353
|
+
* const [loadGreeting, queryRef] = useLoadableQuery(GET_GREETING);
|
|
354
|
+
*
|
|
355
|
+
* return (
|
|
356
|
+
* <>
|
|
357
|
+
* <button onClick={() => loadGreeting({ language: "english" })}>
|
|
358
|
+
* Load greeting
|
|
359
|
+
* </button>
|
|
360
|
+
* <Suspense fallback={<div>Loading...</div>}>
|
|
361
|
+
* {queryRef && <Hello queryRef={queryRef} />}
|
|
362
|
+
* </Suspense>
|
|
363
|
+
* </>
|
|
364
|
+
* );
|
|
365
|
+
* }
|
|
366
|
+
*
|
|
367
|
+
* function Hello({ queryRef }) {
|
|
368
|
+
* const { data } = useReadQuery(queryRef);
|
|
369
|
+
*
|
|
370
|
+
* return <div>{data.greeting.message}</div>;
|
|
371
|
+
* }
|
|
372
|
+
* ```
|
|
373
|
+
*
|
|
374
|
+
* @param query - A GraphQL query document parsed into an AST by `gql`.
|
|
375
|
+
* @param options - Options to control how the query is executed.
|
|
376
|
+
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
377
|
+
*/
|
|
378
|
+
<TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
379
|
+
errorPolicy: "ignore" | "all";
|
|
380
|
+
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
381
|
+
/**
|
|
382
|
+
* A hook for imperatively loading a query, such as responding to a user
|
|
383
|
+
* interaction.
|
|
384
|
+
*
|
|
385
|
+
* > Refer to the [Suspense - Fetching in response to user interaction](https://www.apollographql.com/docs/react/data/suspense#fetching-in-response-to-user-interaction) section for a more in-depth overview of `useLoadableQuery`.
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
*
|
|
389
|
+
* ```jsx
|
|
390
|
+
* import { gql, useLoadableQuery } from "@apollo/client";
|
|
391
|
+
*
|
|
392
|
+
* const GET_GREETING = gql`
|
|
393
|
+
* query GetGreeting($language: String!) {
|
|
394
|
+
* greeting(language: $language) {
|
|
395
|
+
* message
|
|
396
|
+
* }
|
|
397
|
+
* }
|
|
398
|
+
* `;
|
|
399
|
+
*
|
|
400
|
+
* function App() {
|
|
401
|
+
* const [loadGreeting, queryRef] = useLoadableQuery(GET_GREETING);
|
|
402
|
+
*
|
|
403
|
+
* return (
|
|
404
|
+
* <>
|
|
405
|
+
* <button onClick={() => loadGreeting({ language: "english" })}>
|
|
406
|
+
* Load greeting
|
|
407
|
+
* </button>
|
|
408
|
+
* <Suspense fallback={<div>Loading...</div>}>
|
|
409
|
+
* {queryRef && <Hello queryRef={queryRef} />}
|
|
410
|
+
* </Suspense>
|
|
411
|
+
* </>
|
|
412
|
+
* );
|
|
413
|
+
* }
|
|
414
|
+
*
|
|
415
|
+
* function Hello({ queryRef }) {
|
|
416
|
+
* const { data } = useReadQuery(queryRef);
|
|
417
|
+
*
|
|
418
|
+
* return <div>{data.greeting.message}</div>;
|
|
419
|
+
* }
|
|
420
|
+
* ```
|
|
421
|
+
*
|
|
422
|
+
* @param query - A GraphQL query document parsed into an AST by `gql`.
|
|
423
|
+
* @param options - Options to control how the query is executed.
|
|
424
|
+
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
425
|
+
*/
|
|
426
|
+
<TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
427
|
+
returnPartialData: true;
|
|
428
|
+
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "partial">;
|
|
429
|
+
/**
|
|
430
|
+
* A hook for imperatively loading a query, such as responding to a user
|
|
431
|
+
* interaction.
|
|
432
|
+
*
|
|
433
|
+
* > Refer to the [Suspense - Fetching in response to user interaction](https://www.apollographql.com/docs/react/data/suspense#fetching-in-response-to-user-interaction) section for a more in-depth overview of `useLoadableQuery`.
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
*
|
|
437
|
+
* ```jsx
|
|
438
|
+
* import { gql, useLoadableQuery } from "@apollo/client";
|
|
439
|
+
*
|
|
440
|
+
* const GET_GREETING = gql`
|
|
441
|
+
* query GetGreeting($language: String!) {
|
|
442
|
+
* greeting(language: $language) {
|
|
443
|
+
* message
|
|
444
|
+
* }
|
|
445
|
+
* }
|
|
446
|
+
* `;
|
|
447
|
+
*
|
|
448
|
+
* function App() {
|
|
449
|
+
* const [loadGreeting, queryRef] = useLoadableQuery(GET_GREETING);
|
|
450
|
+
*
|
|
451
|
+
* return (
|
|
452
|
+
* <>
|
|
453
|
+
* <button onClick={() => loadGreeting({ language: "english" })}>
|
|
454
|
+
* Load greeting
|
|
455
|
+
* </button>
|
|
456
|
+
* <Suspense fallback={<div>Loading...</div>}>
|
|
457
|
+
* {queryRef && <Hello queryRef={queryRef} />}
|
|
458
|
+
* </Suspense>
|
|
459
|
+
* </>
|
|
460
|
+
* );
|
|
461
|
+
* }
|
|
462
|
+
*
|
|
463
|
+
* function Hello({ queryRef }) {
|
|
464
|
+
* const { data } = useReadQuery(queryRef);
|
|
465
|
+
*
|
|
466
|
+
* return <div>{data.greeting.message}</div>;
|
|
467
|
+
* }
|
|
468
|
+
* ```
|
|
469
|
+
*
|
|
470
|
+
* @param query - A GraphQL query document parsed into an AST by `gql`.
|
|
471
|
+
* @param options - Options to control how the query is executed.
|
|
472
|
+
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
473
|
+
*/
|
|
474
|
+
<TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useLoadableQuery.Options): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming">;
|
|
288
475
|
/**
|
|
289
476
|
* @deprecated Avoid manually specifying generics on `useLoadableQuery`.
|
|
290
477
|
* Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.
|
|
@@ -334,7 +521,7 @@ export declare namespace useLoadableQuery {
|
|
|
334
521
|
* @param options - Options to control how the query is executed.
|
|
335
522
|
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
336
523
|
*/
|
|
337
|
-
<TData
|
|
524
|
+
<TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
338
525
|
returnPartialData: true;
|
|
339
526
|
errorPolicy: "ignore" | "all";
|
|
340
527
|
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "partial" | "empty">;
|
|
@@ -387,7 +574,7 @@ export declare namespace useLoadableQuery {
|
|
|
387
574
|
* @param options - Options to control how the query is executed.
|
|
388
575
|
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
389
576
|
*/
|
|
390
|
-
<TData
|
|
577
|
+
<TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
391
578
|
errorPolicy: "ignore" | "all";
|
|
392
579
|
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
|
|
393
580
|
/**
|
|
@@ -439,7 +626,7 @@ export declare namespace useLoadableQuery {
|
|
|
439
626
|
* @param options - Options to control how the query is executed.
|
|
440
627
|
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
441
628
|
*/
|
|
442
|
-
<TData
|
|
629
|
+
<TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
|
|
443
630
|
returnPartialData: true;
|
|
444
631
|
}): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming" | "partial">;
|
|
445
632
|
/**
|
|
@@ -491,7 +678,7 @@ export declare namespace useLoadableQuery {
|
|
|
491
678
|
* @param options - Options to control how the query is executed.
|
|
492
679
|
* @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
|
|
493
680
|
*/
|
|
494
|
-
<TData
|
|
681
|
+
<TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useLoadableQuery.Options): useLoadableQuery.Result<TData, TVariables, "complete" | "streaming">;
|
|
495
682
|
}
|
|
496
683
|
/**
|
|
497
684
|
* A hook for imperatively loading a query, such as responding to a user
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation.cjs","sources":["../../../../src/react/hooks/useMutation.ts"],"sourcesContent":["import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport { equal } from \"@wry/equality\";\nimport * as React from \"react\";\n\nimport type {\n ApolloCache,\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorLike,\n ErrorPolicy,\n InternalRefetchQueriesInclude,\n MaybeMasked,\n MutationFetchPolicy,\n MutationQueryReducersMap,\n MutationUpdaterFunction,\n NormalizedExecutionResult,\n OnQueryUpdated,\n OperationVariables,\n Unmasked,\n} from \"@apollo/client\";\nimport type { IgnoreModifier } from \"@apollo/client/cache\";\nimport type {\n LazyType,\n NoInfer,\n Prettify,\n SignatureStyle,\n} from \"@apollo/client/utilities/internal\";\nimport {\n mergeOptions,\n preventUnhandledRejection,\n} from \"@apollo/client/utilities/internal\";\n\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\ntype MakeRequiredVariablesOptional<\n TVariables extends OperationVariables,\n TConfiguredVariables extends Partial<TVariables>,\n> = Prettify<\n {\n [K in keyof TVariables as K extends keyof TConfiguredVariables ? K\n : never]?: TVariables[K];\n } & Omit<TVariables, keyof TConfiguredVariables>\n>;\n\n// Extract the `variables` value from an inferred `TOptions`. We use a keyof\n// guard (rather than `TOptions extends { variables: infer V }`) because\n// `variables` in the modern signature's constraint is declared optional, so\n// the `extends { variables: infer V }` form fails to match when the user\n// passes a complex options object that gets widened to include the optional\n// modifier. `TOptions[\"variables\"]` works for both required and optional\n// `variables` entries.\ntype ExtractConfiguredVariables<\n TOptions,\n TVariables extends OperationVariables,\n> = \"variables\" extends keyof TOptions ?\n Exclude<TOptions[\"variables\"], undefined> extends infer V ?\n [V] extends [never] ? {}\n : V extends Partial<TVariables> ? V\n : {}\n : {}\n: {};\n\nexport declare namespace useMutation {\n export interface Options<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = Partial<TVariables>,\n > {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#optimisticResponse:member} */\n optimisticResponse?:\n | Unmasked<NoInfer<TData>>\n | ((\n vars: TVariables,\n { IGNORE }: { IGNORE: IgnoreModifier }\n ) => Unmasked<NoInfer<TData>> | IgnoreModifier);\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#updateQueries:member} */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#refetchQueries:member} */\n refetchQueries?:\n | ((\n result: NormalizedExecutionResult<Unmasked<TData>>\n ) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#awaitRefetchQueries:member} */\n awaitRefetchQueries?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#update:member} */\n update?: MutationUpdaterFunction<TData, TVariables, TCache>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onQueryUpdated:member} */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables?: Partial<TVariables> & TConfiguredVariables;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#context:member} */\n context?: DefaultContext;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: MutationFetchPolicy;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#keepRootFields:member} */\n keepRootFields?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#client:member} */\n client?: ApolloClient;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#notifyOnNetworkStatusChange:member} */\n notifyOnNetworkStatusChange?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onCompleted:member} */\n onCompleted?: (\n data: MaybeMasked<TData>,\n clientOptions?: Options<TData, TVariables, TCache>\n ) => void;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onError:member} */\n onError?: (\n error: ErrorLike,\n clientOptions?: Options<TData, TVariables, TCache>\n ) => void;\n }\n\n export namespace Base {\n export interface Result {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#loading:member} */\n loading: boolean;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#called:member} */\n called: boolean;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#client:member} */\n client: ApolloClient;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#reset:member} */\n reset: () => void;\n }\n }\n\n /**\n * Maps `errorPolicy` to the shape of `data` and `error` as observable from\n * the hook result state.\n *\n * The hook has additional states (before call, during loading) where `data`\n * and `error` are `undefined`, so `data` remains nullable even on error\n * policies that would otherwise guarantee it. Only `error` is narrowed away\n * for `\"ignore\"`, since the underlying `client.mutate` promise never rejects\n * and never resolves with an error for that policy.\n */\n export type ResultStateMap<TData = unknown> = {\n none: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n all: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n ignore: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: undefined;\n };\n undefined: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n };\n\n export type Result<\n TData = unknown,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = Base.Result & ResultStateMap<TData>[`${TErrorPolicy}`];\n\n export namespace DocumentationTypes {\n namespace useMutation {\n export interface Result<TData = unknown> extends Base.Result {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n }\n }\n }\n\n export type ResultTuple<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = [\n mutate: MutationFunction<TData, TVariables, TCache, TErrorPolicy>,\n result: Result<TData, TErrorPolicy>,\n ];\n\n export type MutationFunction<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = (\n ...[options]: {} extends TVariables ?\n [\n options?: MutationFunctionOptions<TData, TVariables, TCache> & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables?: TVariables;\n },\n ]\n : [\n options: MutationFunctionOptions<TData, TVariables, TCache> & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables: TVariables;\n },\n ]\n ) => Promise<ApolloClient.MutateResult<MaybeMasked<TData>, TErrorPolicy>>;\n\n export type MutationFunctionOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n > = Options<TData, TVariables, TCache> & {\n /**\n * {@inheritDoc @apollo/client!MutationOptionsDocumentation#context:member}\n *\n * @remarks\n * When provided as a callback function, the function is called with the\n * value of `context` provided to the `useMutation` hook.\n */\n context?:\n | DefaultContext\n | ((hookContext: DefaultContext | undefined) => DefaultContext);\n };\n\n export interface DefaultOptions\n extends ApolloClient.DefaultOptions.Mutate.Calculated {}\n\n export type ResultForOptions<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n TOptions extends Record<string, never> | Options<TData, TVariables, TCache>,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = LazyType<\n ResultTuple<\n TData,\n MakeRequiredVariablesOptional<\n TVariables,\n ExtractConfiguredVariables<TOptions, TVariables>\n >,\n TCache,\n [TErrorPolicy] extends [undefined] ?\n DefaultOptions extends { errorPolicy: infer D } ?\n D\n : undefined\n : TErrorPolicy\n >\n >;\n\n export namespace DocumentationTypes {\n /**\n * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.\n *\n * @example\n *\n * ```jsx\n * import { gql, useMutation } from \"@apollo/client\";\n *\n * const ADD_TODO = gql`\n * mutation AddTodo($type: String!) {\n * addTodo(type: $type) {\n * id\n * type\n * }\n * }\n * `;\n *\n * function AddTodo() {\n * let input;\n * const [addTodo, { data }] = useMutation(ADD_TODO);\n *\n * return (\n * <div>\n * <form\n * onSubmit={(e) => {\n * e.preventDefault();\n * addTodo({ variables: { type: input.value } });\n * input.value = \"\";\n * }}\n * >\n * <input\n * ref={(node) => {\n * input = node;\n * }}\n * />\n * <button type=\"submit\">Add Todo</button>\n * </form>\n * </div>\n * );\n * }\n * ```\n *\n * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.\n * @param options - Options to control how the mutation is executed.\n * @returns A tuple in the form of `[mutate, result]`\n */\n export interface useMutation {\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: Options<TData, TVariables>\n ): ResultTuple<TData, TVariables>;\n }\n\n /**\n * @deprecated Avoid manually specifying generics on `useMutation`.\n * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your mutation results.\n *\n * {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)}\n */\n export interface useMutation_Deprecated {\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: Options<TData, TVariables>\n ): ResultTuple<TData, TVariables>;\n }\n }\n\n export namespace Signatures {\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation_Deprecated:call(1)} */\n export interface Classic {\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = {},\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache,\n {\n [K in keyof TConfiguredVariables]: K extends keyof TVariables ?\n TConfiguredVariables[K]\n : never;\n }\n > & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: TErrorPolicy;\n }\n ): useMutation.ResultTuple<\n TData,\n MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,\n TCache,\n TErrorPolicy\n >;\n }\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n export interface Modern {\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>\n ): useMutation.ResultForOptions<\n TData,\n TVariables,\n TCache,\n Record<string, never>\n >;\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache\n > & {\n variables?: {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n };\n },\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: TOptions & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: TErrorPolicy;\n }\n ): useMutation.ResultForOptions<\n TData,\n TVariables,\n TCache,\n TOptions,\n TErrorPolicy\n >;\n }\n\n export type Evaluated = SignatureStyle extends \"classic\" ? Classic : Modern;\n }\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n export interface Signature extends Signatures.Evaluated {}\n}\n\n/** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\nexport const useMutation: useMutation.Signature = function useMutation<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = {},\n>(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache,\n {\n [K in keyof TConfiguredVariables]: K extends keyof TVariables ?\n TConfiguredVariables[K]\n : never;\n }\n >\n): useMutation.ResultTuple<\n TData,\n MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,\n TCache\n> {\n const client = useApolloClient(options?.client);\n const [result, setResult] = React.useState<\n Omit<useMutation.Result<TData>, \"reset\">\n >(() => createInitialResult(client));\n\n const ref = React.useRef({\n result,\n mutationId: 0,\n isMounted: true,\n client,\n mutation,\n options,\n });\n\n useIsomorphicLayoutEffect(() => {\n Object.assign(ref.current, { client, options, mutation });\n });\n\n const execute = React.useCallback(\n (\n executeOptions: useMutation.MutationFunctionOptions<\n TData,\n TVariables,\n TCache\n > = {} as useMutation.MutationFunctionOptions<TData, TVariables, TCache>\n ) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n const context =\n typeof executeOptions.context === \"function\" ?\n executeOptions.context(options?.context)\n : executeOptions.context;\n\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult(\n (ref.current.result = {\n loading: true,\n error: undefined,\n data: undefined,\n called: true,\n client,\n })\n );\n }\n\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, {\n ...executeOptions,\n context,\n } as any);\n\n return preventUnhandledRejection(\n client\n .mutate(\n clientOptions as ApolloClient.MutateOptions<\n TData,\n OperationVariables\n >\n )\n .then(\n (response) => {\n const { data, error } = response;\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (error && onError) {\n onError(error, clientOptions);\n }\n\n if (mutationId === ref.current.mutationId) {\n const result = {\n called: true,\n loading: false,\n data,\n error,\n client,\n };\n\n if (\n ref.current.isMounted &&\n !equal(ref.current.result, result)\n ) {\n setResult((ref.current.result = result));\n }\n }\n\n const onCompleted =\n executeOptions.onCompleted || ref.current.options?.onCompleted;\n\n if (!error) {\n onCompleted?.(response.data!, clientOptions);\n }\n\n return response;\n },\n (error) => {\n if (\n mutationId === ref.current.mutationId &&\n ref.current.isMounted\n ) {\n const result = {\n loading: false,\n error,\n data: void 0,\n called: true,\n client,\n };\n\n if (!equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (onError) {\n onError(error, clientOptions);\n }\n\n throw error;\n }\n )\n );\n },\n []\n );\n\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = createInitialResult(ref.current.client);\n Object.assign(ref.current, { mutationId: 0, result });\n setResult(result);\n }\n }, []);\n\n React.useEffect(() => {\n const current = ref.current;\n current.isMounted = true;\n\n return () => {\n current.isMounted = false;\n };\n }, []);\n\n return [execute as any, { reset, ...result }];\n} as any;\n\nfunction createInitialResult(client: ApolloClient) {\n return {\n data: undefined,\n error: undefined,\n called: false,\n loading: false,\n client,\n };\n}\n"],"names":[],"mappings":";;;;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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AJ,CAAA,CAAA,CAAA,CAAA,CAAU,EAAE,CAAZ,CAAA,CAAA,CAAA,CAAiB;QACb,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAE,CAAb,CAAA,CAAA,CAAA,CAAkB;QACd,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAU;IACV,CAAG;AACH;"}
|
|
1
|
+
{"version":3,"file":"useMutation.cjs","sources":["../../../../src/react/hooks/useMutation.ts"],"sourcesContent":["import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport { equal } from \"@wry/equality\";\nimport * as React from \"react\";\n\nimport type {\n ApolloCache,\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorLike,\n ErrorPolicy,\n InternalRefetchQueriesInclude,\n MaybeMasked,\n MutationFetchPolicy,\n MutationQueryReducersMap,\n MutationUpdaterFunction,\n NormalizedExecutionResult,\n OnQueryUpdated,\n OperationVariables,\n Unmasked,\n} from \"@apollo/client\";\nimport type { IgnoreModifier } from \"@apollo/client/cache\";\nimport type {\n LazyType,\n NoInfer,\n Prettify,\n SignatureStyle,\n} from \"@apollo/client/utilities/internal\";\nimport {\n mergeOptions,\n preventUnhandledRejection,\n} from \"@apollo/client/utilities/internal\";\n\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\ntype MakeRequiredVariablesOptional<\n TVariables extends OperationVariables,\n TConfiguredVariables extends Partial<TVariables>,\n> = Prettify<\n {\n [K in keyof TVariables as K extends keyof TConfiguredVariables ? K\n : never]?: TVariables[K];\n } & Omit<TVariables, keyof TConfiguredVariables>\n>;\n\n// Extract the `variables` value from an inferred `TOptions`. We use a keyof\n// guard (rather than `TOptions extends { variables: infer V }`) because\n// `variables` in the modern signature's constraint is declared optional, so\n// the `extends { variables: infer V }` form fails to match when the user\n// passes a complex options object that gets widened to include the optional\n// modifier. `TOptions[\"variables\"]` works for both required and optional\n// `variables` entries.\ntype ExtractConfiguredVariables<\n TOptions,\n TVariables extends OperationVariables,\n> = \"variables\" extends keyof TOptions ?\n Exclude<TOptions[\"variables\"], undefined> extends infer V ?\n [V] extends [never] ? {}\n : V extends Partial<TVariables> ? V\n : {}\n : {}\n: {};\n\nexport declare namespace useMutation {\n export interface Options<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = Partial<TVariables>,\n > {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#optimisticResponse:member} */\n optimisticResponse?:\n | Unmasked<NoInfer<TData>>\n | ((\n vars: TVariables,\n { IGNORE }: { IGNORE: IgnoreModifier }\n ) => Unmasked<NoInfer<TData>> | IgnoreModifier);\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#updateQueries:member} */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#refetchQueries:member} */\n refetchQueries?:\n | ((\n result: NormalizedExecutionResult<Unmasked<TData>>\n ) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#awaitRefetchQueries:member} */\n awaitRefetchQueries?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#update:member} */\n update?: MutationUpdaterFunction<TData, TVariables, TCache>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onQueryUpdated:member} */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables?: Partial<TVariables> & TConfiguredVariables;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#context:member} */\n context?: DefaultContext;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: MutationFetchPolicy;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#keepRootFields:member} */\n keepRootFields?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#client:member} */\n client?: ApolloClient;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#notifyOnNetworkStatusChange:member} */\n notifyOnNetworkStatusChange?: boolean;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onCompleted:member} */\n onCompleted?: (\n data: MaybeMasked<TData>,\n clientOptions?: Options<TData, TVariables, TCache>\n ) => void;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onError:member} */\n onError?: (\n error: ErrorLike,\n clientOptions?: Options<TData, TVariables, TCache>\n ) => void;\n }\n\n export namespace Base {\n export interface Result {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#loading:member} */\n loading: boolean;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#called:member} */\n called: boolean;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#client:member} */\n client: ApolloClient;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#reset:member} */\n reset: () => void;\n }\n }\n\n /**\n * Maps `errorPolicy` to the shape of `data` and `error` as observable from\n * the hook result state.\n *\n * The hook has additional states (before call, during loading) where `data`\n * and `error` are `undefined`, so `data` remains nullable even on error\n * policies that would otherwise guarantee it. Only `error` is narrowed away\n * for `\"ignore\"`, since the underlying `client.mutate` promise never rejects\n * and never resolves with an error for that policy.\n */\n export type ResultStateMap<TData = unknown> = {\n none: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n all: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n ignore: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: undefined;\n };\n undefined: {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n };\n };\n\n export type Result<\n TData = unknown,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = Base.Result & ResultStateMap<TData>[`${TErrorPolicy}`];\n\n export namespace DocumentationTypes {\n namespace useMutation {\n export interface Result<TData = unknown> extends Base.Result {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data: MaybeMasked<TData> | null | undefined;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error: ErrorLike | undefined;\n }\n }\n }\n\n export type ResultTuple<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = [\n mutate: MutationFunction<TData, TVariables, TCache, TErrorPolicy>,\n result: Result<TData, TErrorPolicy>,\n ];\n\n export type MutationFunction<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = (\n ...[options]: {} extends TVariables ?\n [\n options?: MutationFunctionOptions<TData, TVariables, TCache> & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables?: TVariables;\n },\n ]\n : [\n options: MutationFunctionOptions<TData, TVariables, TCache> & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#variables:member} */\n variables: TVariables;\n },\n ]\n ) => Promise<ApolloClient.MutateResult<MaybeMasked<TData>, TErrorPolicy>>;\n\n export type MutationFunctionOptions<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n > = Options<TData, TVariables, TCache> & {\n /**\n * {@inheritDoc @apollo/client!MutationOptionsDocumentation#context:member}\n *\n * @remarks\n * When provided as a callback function, the function is called with the\n * value of `context` provided to the `useMutation` hook.\n */\n context?:\n | DefaultContext\n | ((hookContext: DefaultContext | undefined) => DefaultContext);\n };\n\n export interface DefaultOptions\n extends ApolloClient.DefaultOptions.Mutate.Calculated {}\n\n export type ResultForOptions<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n TOptions extends Record<string, never> | Options<TData, TVariables, TCache>,\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n > = LazyType<\n ResultTuple<\n TData,\n MakeRequiredVariablesOptional<\n TVariables,\n ExtractConfiguredVariables<TOptions, TVariables>\n >,\n TCache,\n [TErrorPolicy] extends [undefined] ?\n DefaultOptions extends { errorPolicy: infer D } ?\n D\n : undefined\n : TErrorPolicy\n >\n >;\n\n export namespace DocumentationTypes {\n /**\n * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.\n *\n * @example\n *\n * ```jsx\n * import { gql, useMutation } from \"@apollo/client\";\n *\n * const ADD_TODO = gql`\n * mutation AddTodo($type: String!) {\n * addTodo(type: $type) {\n * id\n * type\n * }\n * }\n * `;\n *\n * function AddTodo() {\n * let input;\n * const [addTodo, { data }] = useMutation(ADD_TODO);\n *\n * return (\n * <div>\n * <form\n * onSubmit={(e) => {\n * e.preventDefault();\n * addTodo({ variables: { type: input.value } });\n * input.value = \"\";\n * }}\n * >\n * <input\n * ref={(node) => {\n * input = node;\n * }}\n * />\n * <button type=\"submit\">Add Todo</button>\n * </form>\n * </div>\n * );\n * }\n * ```\n *\n * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.\n * @param options - Options to control how the mutation is executed.\n * @returns A tuple in the form of `[mutate, result]`\n */\n export interface useMutation {\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: Options<TData, TVariables>\n ): ResultTuple<TData, TVariables>;\n }\n }\n\n export namespace Signatures {\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n export interface Classic {\n // _INFERENCE_ONLY_DO_NOT_SPECIFY is used to distinguish between inferred\n // generics arguments and explicit generic arguments so that we can\n // provide a `@deprecated` signature for explicit generic arguments. As\n // soon as a user provides a generic arg (e.g. useMutation<TData>(mutation))`,\n // the overload falls through to the overloads without\n // _INFERENCE_ONLY_DO_NOT_SPECIFY.\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n _INFERENCE_ONLY_DO_NOT_SPECIFY extends \"inferred\",\n TConfiguredVariables extends Partial<TVariables> = {},\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n ApolloCache,\n {\n [K in keyof TConfiguredVariables]: K extends keyof TVariables ?\n TConfiguredVariables[K]\n : never;\n }\n > & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: TErrorPolicy;\n }\n ): useMutation.ResultTuple<\n TData,\n MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,\n ApolloCache,\n TErrorPolicy\n >;\n\n /**\n * @deprecated Avoid manually specifying generics on `useMutation`.\n * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your mutation results.\n *\n * {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)}\n */\n <\n TData,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = {},\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache,\n {\n [K in keyof TConfiguredVariables]: K extends keyof TVariables ?\n TConfiguredVariables[K]\n : never;\n }\n > &\n (TErrorPolicy extends undefined ? {}\n : {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy: TErrorPolicy;\n })\n ): useMutation.ResultTuple<\n TData,\n MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,\n TCache,\n TErrorPolicy\n >;\n }\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n export interface Modern {\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>\n ): useMutation.ResultForOptions<\n TData,\n TVariables,\n TCache,\n Record<string, never>\n >;\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache\n > & {\n variables?: {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n };\n },\n TErrorPolicy extends ErrorPolicy | undefined = undefined,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: TOptions & {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: TErrorPolicy;\n }\n ): useMutation.ResultForOptions<\n TData,\n TVariables,\n TCache,\n TOptions,\n TErrorPolicy\n >;\n }\n\n export type Evaluated = SignatureStyle extends \"classic\" ? Classic : Modern;\n }\n\n /** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\n export interface Signature extends Signatures.Evaluated {}\n}\n\n/** {@inheritDoc @apollo/client/react!useMutation.DocumentationTypes.useMutation:call(1)} */\nexport const useMutation: useMutation.Signature = function useMutation<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n TConfiguredVariables extends Partial<TVariables> = {},\n>(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TCache,\n {\n [K in keyof TConfiguredVariables]: K extends keyof TVariables ?\n TConfiguredVariables[K]\n : never;\n }\n >\n): useMutation.ResultTuple<\n TData,\n MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,\n TCache\n> {\n const client = useApolloClient(options?.client);\n const [result, setResult] = React.useState<\n Omit<useMutation.Result<TData>, \"reset\">\n >(() => createInitialResult(client));\n\n const ref = React.useRef({\n result,\n mutationId: 0,\n isMounted: true,\n client,\n mutation,\n options,\n });\n\n useIsomorphicLayoutEffect(() => {\n Object.assign(ref.current, { client, options, mutation });\n });\n\n const execute = React.useCallback(\n (\n executeOptions: useMutation.MutationFunctionOptions<\n TData,\n TVariables,\n TCache\n > = {} as useMutation.MutationFunctionOptions<TData, TVariables, TCache>\n ) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n const context =\n typeof executeOptions.context === \"function\" ?\n executeOptions.context(options?.context)\n : executeOptions.context;\n\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult(\n (ref.current.result = {\n loading: true,\n error: undefined,\n data: undefined,\n called: true,\n client,\n })\n );\n }\n\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, {\n ...executeOptions,\n context,\n } as any);\n\n return preventUnhandledRejection(\n client\n .mutate(\n clientOptions as ApolloClient.MutateOptions<\n TData,\n OperationVariables\n >\n )\n .then(\n (response) => {\n const { data, error } = response;\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (error && onError) {\n onError(error, clientOptions);\n }\n\n if (mutationId === ref.current.mutationId) {\n const result = {\n called: true,\n loading: false,\n data,\n error,\n client,\n };\n\n if (\n ref.current.isMounted &&\n !equal(ref.current.result, result)\n ) {\n setResult((ref.current.result = result));\n }\n }\n\n const onCompleted =\n executeOptions.onCompleted || ref.current.options?.onCompleted;\n\n if (!error) {\n onCompleted?.(response.data!, clientOptions);\n }\n\n return response;\n },\n (error) => {\n if (\n mutationId === ref.current.mutationId &&\n ref.current.isMounted\n ) {\n const result = {\n loading: false,\n error,\n data: void 0,\n called: true,\n client,\n };\n\n if (!equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n\n const onError =\n executeOptions.onError || ref.current.options?.onError;\n\n if (onError) {\n onError(error, clientOptions);\n }\n\n throw error;\n }\n )\n );\n },\n []\n );\n\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = createInitialResult(ref.current.client);\n Object.assign(ref.current, { mutationId: 0, result });\n setResult(result);\n }\n }, []);\n\n React.useEffect(() => {\n const current = ref.current;\n current.isMounted = true;\n\n return () => {\n current.isMounted = false;\n };\n }, []);\n\n return [execute as any, { reset, ...result }];\n} as any;\n\nfunction createInitialResult(client: ApolloClient) {\n return {\n data: undefined,\n error: undefined,\n called: false,\n loading: false,\n client,\n };\n}\n"],"names":[],"mappings":";;;;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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CAAA,CAAA,CAAS,EAAE,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB;QAChB,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAU,EAAE,CAAZ,CAAA,CAAA,CAAA,CAAiB;QACb,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAE,CAAb,CAAA,CAAA,CAAA,CAAkB;QACd,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAU;IACV,CAAG;AACH;"}
|
|
@@ -350,13 +350,6 @@ export declare namespace useMutation {
|
|
|
350
350
|
interface useMutation {
|
|
351
351
|
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: Options<TData, TVariables>): ResultTuple<TData, TVariables>;
|
|
352
352
|
}
|
|
353
|
-
/**
|
|
354
|
-
* @deprecated Avoid manually specifying generics on `useMutation`.
|
|
355
|
-
* Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your mutation results.
|
|
356
|
-
*/
|
|
357
|
-
interface useMutation_Deprecated {
|
|
358
|
-
<TData = unknown, TVariables extends OperationVariables = OperationVariables>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: Options<TData, TVariables>): ResultTuple<TData, TVariables>;
|
|
359
|
-
}
|
|
360
353
|
}
|
|
361
354
|
namespace Signatures {
|
|
362
355
|
/**
|
|
@@ -366,7 +359,7 @@ export declare namespace useMutation {
|
|
|
366
359
|
/**
|
|
367
360
|
*
|
|
368
361
|
*/
|
|
369
|
-
<TData
|
|
362
|
+
<TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred", TConfiguredVariables extends Partial<TVariables> = {}, TErrorPolicy extends ErrorPolicy | undefined = undefined>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useMutation.Options<NoInfer<TData>, NoInfer<TVariables>, ApolloCache, {
|
|
370
363
|
[K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never;
|
|
371
364
|
}> & {
|
|
372
365
|
/**
|
|
@@ -379,7 +372,25 @@ export declare namespace useMutation {
|
|
|
379
372
|
* @docGroup 1. Operation options
|
|
380
373
|
*/
|
|
381
374
|
errorPolicy?: TErrorPolicy;
|
|
382
|
-
}): useMutation.ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>,
|
|
375
|
+
}): useMutation.ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>, ApolloCache, TErrorPolicy>;
|
|
376
|
+
/**
|
|
377
|
+
* @deprecated Avoid manually specifying generics on `useMutation`.
|
|
378
|
+
* Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your mutation results.
|
|
379
|
+
*/
|
|
380
|
+
<TData, TVariables extends OperationVariables = OperationVariables, TCache extends ApolloCache = ApolloCache, TConfiguredVariables extends Partial<TVariables> = {}, TErrorPolicy extends ErrorPolicy | undefined = undefined>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useMutation.Options<NoInfer<TData>, NoInfer<TVariables>, TCache, {
|
|
381
|
+
[K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never;
|
|
382
|
+
}> & (TErrorPolicy extends undefined ? {} : {
|
|
383
|
+
/**
|
|
384
|
+
* Specifies how the mutation handles a response that returns both GraphQL errors and partial results.
|
|
385
|
+
*
|
|
386
|
+
* For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
|
|
387
|
+
*
|
|
388
|
+
* The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.
|
|
389
|
+
*
|
|
390
|
+
* @docGroup 1. Operation options
|
|
391
|
+
*/
|
|
392
|
+
errorPolicy: TErrorPolicy;
|
|
393
|
+
})): useMutation.ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>, TCache, TErrorPolicy>;
|
|
383
394
|
}
|
|
384
395
|
/**
|
|
385
396
|
*
|