@apollo/client 4.2.0-alpha.2 → 4.2.0-alpha.3

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/__cjs/core/ApolloClient.cjs +9 -9
  3. package/__cjs/core/ApolloClient.cjs.map +1 -1
  4. package/__cjs/core/ApolloClient.d.cts +131 -21
  5. package/__cjs/link/ws/index.cjs +9 -1
  6. package/__cjs/link/ws/index.cjs.map +1 -1
  7. package/__cjs/link/ws/index.d.cts +1 -1
  8. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  9. package/__cjs/react/hooks/useBackgroundQuery.d.cts +1466 -65
  10. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  11. package/__cjs/react/hooks/useLazyQuery.d.cts +346 -39
  12. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  13. package/__cjs/react/hooks/useLoadableQuery.d.cts +492 -49
  14. package/__cjs/react/hooks/useMutation.cjs +5 -48
  15. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  16. package/__cjs/react/hooks/useMutation.d.cts +239 -130
  17. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  18. package/__cjs/react/hooks/useQuery.d.cts +570 -40
  19. package/__cjs/react/hooks/useSubscription.cjs +1 -1
  20. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  21. package/__cjs/react/hooks/useSubscription.d.cts +2 -2
  22. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  23. package/__cjs/react/hooks/useSuspenseQuery.d.cts +734 -45
  24. package/__cjs/version.cjs +1 -1
  25. package/core/ApolloClient.d.ts +131 -21
  26. package/core/ApolloClient.js +9 -9
  27. package/core/ApolloClient.js.map +1 -1
  28. package/link/ws/index.d.ts +1 -1
  29. package/link/ws/index.js +9 -1
  30. package/link/ws/index.js.map +1 -1
  31. package/package.json +3 -7
  32. package/react/hooks/useBackgroundQuery.d.ts +1466 -65
  33. package/react/hooks/useBackgroundQuery.js.map +1 -1
  34. package/react/hooks/useLazyQuery.d.ts +346 -39
  35. package/react/hooks/useLazyQuery.js.map +1 -1
  36. package/react/hooks/useLoadableQuery.d.ts +492 -49
  37. package/react/hooks/useLoadableQuery.js.map +1 -1
  38. package/react/hooks/useMutation.d.ts +239 -130
  39. package/react/hooks/useMutation.js +5 -48
  40. package/react/hooks/useMutation.js.map +1 -1
  41. package/react/hooks/useQuery.d.ts +570 -40
  42. package/react/hooks/useQuery.js.map +1 -1
  43. package/react/hooks/useSubscription.d.ts +2 -2
  44. package/react/hooks/useSubscription.js +1 -1
  45. package/react/hooks/useSubscription.js.map +1 -1
  46. package/react/hooks/useSuspenseQuery.d.ts +734 -45
  47. package/react/hooks/useSuspenseQuery.js.map +1 -1
  48. package/react/hooks-compiled/useBackgroundQuery.d.ts +1466 -65
  49. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  50. package/react/hooks-compiled/useLazyQuery.d.ts +346 -39
  51. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  52. package/react/hooks-compiled/useLoadableQuery.d.ts +492 -49
  53. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  54. package/react/hooks-compiled/useMutation.d.ts +239 -130
  55. package/react/hooks-compiled/useMutation.js +4 -47
  56. package/react/hooks-compiled/useMutation.js.map +1 -1
  57. package/react/hooks-compiled/useQuery.d.ts +570 -40
  58. package/react/hooks-compiled/useQuery.js.map +1 -1
  59. package/react/hooks-compiled/useSubscription.d.ts +2 -2
  60. package/react/hooks-compiled/useSubscription.js +1 -1
  61. package/react/hooks-compiled/useSubscription.js.map +1 -1
  62. package/react/hooks-compiled/useSuspenseQuery.d.ts +734 -45
  63. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  64. package/skills/apollo-client/SKILL.md +168 -0
  65. package/skills/apollo-client/references/caching.md +560 -0
  66. package/skills/apollo-client/references/error-handling.md +350 -0
  67. package/skills/apollo-client/references/fragments.md +804 -0
  68. package/skills/apollo-client/references/integration-client.md +336 -0
  69. package/skills/apollo-client/references/integration-nextjs.md +325 -0
  70. package/skills/apollo-client/references/integration-react-router.md +256 -0
  71. package/skills/apollo-client/references/integration-tanstack-start.md +378 -0
  72. package/skills/apollo-client/references/mutations.md +549 -0
  73. package/skills/apollo-client/references/queries.md +416 -0
  74. package/skills/apollo-client/references/state-management.md +428 -0
  75. package/skills/apollo-client/references/suspense-hooks.md +773 -0
  76. package/skills/apollo-client/references/troubleshooting.md +487 -0
  77. package/skills/apollo-client/references/typescript-codegen.md +133 -0
  78. package/version.js +1 -1
@@ -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 { NoInfer, Prettify } 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\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 interface Result<TData = unknown> {\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 /** {@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 export type ResultTuple<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\n > = [\n mutate: MutationFunction<TData, TVariables, TCache>,\n result: Result<TData>,\n ];\n\n export type MutationFunction<\n TData,\n TVariables extends OperationVariables,\n TCache extends ApolloCache = ApolloCache,\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>>>;\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 namespace DocumentationTypes {\n /** {@inheritDoc @apollo/client/react!useMutation:function(1)} */\n export function useMutation<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<TData, TVariables>\n ): useMutation.ResultTuple<TData, TVariables>;\n }\n}\n\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 */\nexport 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}\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":";;AAyOA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAxOA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAqBA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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A,CAAA,CAAA,EAAS,CAAC,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB,EAAE,EAAE,CAA5B,CAAA,CAAA,CAAA,CAAiC,EAAE,CAAnC,CAAA,CAAsC,CAAtC,CAAA,CAAA,CAAA,CAAA,EAAA,CAA8C,CAAC;AAC/C;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4B,CAAC,CAA7B,CAAA,CAAA,CAAA,CAAA,CAAiD,EAAjD;IACE,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS;QACL,CAAJ,CAAA,CAAA,CAAQ,EAAE,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB;QACf,CAAJ,CAAA,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;"}
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,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;QACL,CAAJ,CAAA,CAAA,CAAQ,EAAE,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB;QACf,CAAJ,CAAA,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;"}
@@ -1,10 +1,13 @@
1
1
  import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
2
2
  import type { ApolloCache, ApolloClient, DefaultContext, DocumentNode, ErrorLike, ErrorPolicy, InternalRefetchQueriesInclude, MaybeMasked, MutationFetchPolicy, MutationQueryReducersMap, MutationUpdaterFunction, NormalizedExecutionResult, OnQueryUpdated, OperationVariables, Unmasked } from "@apollo/client";
3
3
  import type { IgnoreModifier } from "@apollo/client/cache";
4
- import type { NoInfer, Prettify } from "@apollo/client/utilities/internal";
4
+ import type { LazyType, NoInfer, Prettify, SignatureStyle } from "@apollo/client/utilities/internal";
5
5
  type MakeRequiredVariablesOptional<TVariables extends OperationVariables, TConfiguredVariables extends Partial<TVariables>> = Prettify<{
6
6
  [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K];
7
7
  } & Omit<TVariables, keyof TConfiguredVariables>>;
8
+ type ExtractConfiguredVariables<TOptions, TVariables extends OperationVariables> = "variables" extends keyof TOptions ? Exclude<TOptions["variables"], undefined> extends infer V ? [
9
+ V
10
+ ] extends [never] ? {} : V extends Partial<TVariables> ? V : {} : {} : {};
8
11
  export declare namespace useMutation {
9
12
  interface Options<TData = unknown, TVariables extends OperationVariables = OperationVariables, TCache extends ApolloCache = ApolloCache, TConfiguredVariables extends Partial<TVariables> = Partial<TVariables>> {
10
13
  /**
@@ -141,43 +144,120 @@ export declare namespace useMutation {
141
144
  */
142
145
  onError?: (error: ErrorLike, clientOptions?: Options<TData, TVariables, TCache>) => void;
143
146
  }
144
- interface Result<TData = unknown> {
145
- /**
146
- * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
147
- * is `all` or `ignore` and the server returns a GraphQL response with `errors`
148
- * but not `data` or a network error is returned.
149
- */
150
- data: MaybeMasked<TData> | null | undefined;
151
- /**
152
- * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
153
- *
154
- * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
155
- */
156
- error: ErrorLike | undefined;
157
- /**
158
- * If `true`, the mutation is currently in flight.
159
- */
160
- loading: boolean;
161
- /**
162
- * If `true`, the mutation's mutate function has been called.
163
- */
164
- called: boolean;
165
- /**
166
- * The instance of Apollo Client that executed the mutation.
167
- *
168
- * Can be useful for manually executing followup operations or writing data to the cache.
169
- */
170
- client: ApolloClient;
171
- /**
172
- * A function that you can call to reset the mutation's result to its initial, uncalled state.
173
- */
174
- reset: () => void;
147
+ namespace Base {
148
+ interface Result {
149
+ /**
150
+ * If `true`, the mutation is currently in flight.
151
+ */
152
+ loading: boolean;
153
+ /**
154
+ * If `true`, the mutation's mutate function has been called.
155
+ */
156
+ called: boolean;
157
+ /**
158
+ * The instance of Apollo Client that executed the mutation.
159
+ *
160
+ * Can be useful for manually executing followup operations or writing data to the cache.
161
+ */
162
+ client: ApolloClient;
163
+ /**
164
+ * A function that you can call to reset the mutation's result to its initial, uncalled state.
165
+ */
166
+ reset: () => void;
167
+ }
175
168
  }
176
- type ResultTuple<TData, TVariables extends OperationVariables, TCache extends ApolloCache = ApolloCache> = [
177
- mutate: MutationFunction<TData, TVariables, TCache>,
178
- result: Result<TData>
169
+ /**
170
+ * Maps `errorPolicy` to the shape of `data` and `error` as observable from
171
+ * the hook result state.
172
+ *
173
+ * The hook has additional states (before call, during loading) where `data`
174
+ * and `error` are `undefined`, so `data` remains nullable even on error
175
+ * policies that would otherwise guarantee it. Only `error` is narrowed away
176
+ * for `"ignore"`, since the underlying `client.mutate` promise never rejects
177
+ * and never resolves with an error for that policy.
178
+ */
179
+ type ResultStateMap<TData = unknown> = {
180
+ none: {
181
+ /**
182
+ * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
183
+ * is `all` or `ignore` and the server returns a GraphQL response with `errors`
184
+ * but not `data` or a network error is returned.
185
+ */
186
+ data: MaybeMasked<TData> | null | undefined;
187
+ /**
188
+ * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
189
+ *
190
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
191
+ */
192
+ error: ErrorLike | undefined;
193
+ };
194
+ all: {
195
+ /**
196
+ * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
197
+ * is `all` or `ignore` and the server returns a GraphQL response with `errors`
198
+ * but not `data` or a network error is returned.
199
+ */
200
+ data: MaybeMasked<TData> | null | undefined;
201
+ /**
202
+ * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
203
+ *
204
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
205
+ */
206
+ error: ErrorLike | undefined;
207
+ };
208
+ ignore: {
209
+ /**
210
+ * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
211
+ * is `all` or `ignore` and the server returns a GraphQL response with `errors`
212
+ * but not `data` or a network error is returned.
213
+ */
214
+ data: MaybeMasked<TData> | null | undefined;
215
+ /**
216
+ * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
217
+ *
218
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
219
+ */
220
+ error: undefined;
221
+ };
222
+ undefined: {
223
+ /**
224
+ * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
225
+ * is `all` or `ignore` and the server returns a GraphQL response with `errors`
226
+ * but not `data` or a network error is returned.
227
+ */
228
+ data: MaybeMasked<TData> | null | undefined;
229
+ /**
230
+ * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
231
+ *
232
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
233
+ */
234
+ error: ErrorLike | undefined;
235
+ };
236
+ };
237
+ type Result<TData = unknown, TErrorPolicy extends ErrorPolicy | undefined = undefined> = Base.Result & ResultStateMap<TData>[`${TErrorPolicy}`];
238
+ namespace DocumentationTypes {
239
+ namespace useMutation {
240
+ interface Result<TData = unknown> extends Base.Result {
241
+ /**
242
+ * The data returned from your mutation. Can be `undefined` if the `errorPolicy`
243
+ * is `all` or `ignore` and the server returns a GraphQL response with `errors`
244
+ * but not `data` or a network error is returned.
245
+ */
246
+ data: MaybeMasked<TData> | null | undefined;
247
+ /**
248
+ * If the mutation produces one or more errors, this object contains either an array of `graphQLErrors` or a single `networkError`. Otherwise, this value is `undefined`.
249
+ *
250
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
251
+ */
252
+ error: ErrorLike | undefined;
253
+ }
254
+ }
255
+ }
256
+ type ResultTuple<TData, TVariables extends OperationVariables, TCache extends ApolloCache = ApolloCache, TErrorPolicy extends ErrorPolicy | undefined = undefined> = [
257
+ mutate: MutationFunction<TData, TVariables, TCache, TErrorPolicy>,
258
+ result: Result<TData, TErrorPolicy>
179
259
  ];
180
- type MutationFunction<TData, TVariables extends OperationVariables, TCache extends ApolloCache = ApolloCache> = (...[options]: {} extends TVariables ? [
260
+ type MutationFunction<TData, TVariables extends OperationVariables, TCache extends ApolloCache = ApolloCache, TErrorPolicy extends ErrorPolicy | undefined = undefined> = (...[options]: {} extends TVariables ? [
181
261
  options?: MutationFunctionOptions<TData, TVariables, TCache> & {
182
262
  /**
183
263
  * An object containing all of the GraphQL variables your mutation requires to execute.
@@ -199,7 +279,7 @@ export declare namespace useMutation {
199
279
  */
200
280
  variables: TVariables;
201
281
  }
202
- ]) => Promise<ApolloClient.MutateResult<MaybeMasked<TData>>>;
282
+ ]) => Promise<ApolloClient.MutateResult<MaybeMasked<TData>, TErrorPolicy>>;
203
283
  type MutationFunctionOptions<TData = unknown, TVariables extends OperationVariables = OperationVariables, TCache extends ApolloCache = ApolloCache> = Options<TData, TVariables, TCache> & {
204
284
  /**
205
285
  * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.
@@ -213,104 +293,133 @@ export declare namespace useMutation {
213
293
  */
214
294
  context?: DefaultContext | ((hookContext: DefaultContext | undefined) => DefaultContext);
215
295
  };
296
+ interface DefaultOptions extends ApolloClient.DefaultOptions.Mutate.Calculated {
297
+ }
298
+ type ResultForOptions<TData, TVariables extends OperationVariables, TCache extends ApolloCache, TOptions extends Record<string, never> | Options<TData, TVariables, TCache>, TErrorPolicy extends ErrorPolicy | undefined = undefined> = LazyType<ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, ExtractConfiguredVariables<TOptions, TVariables>>, TCache, [
299
+ TErrorPolicy
300
+ ] extends [undefined] ? DefaultOptions extends {
301
+ errorPolicy: infer D;
302
+ } ? D : undefined : TErrorPolicy>>;
216
303
  namespace DocumentationTypes {
217
304
  /**
218
- * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.
219
- *
220
- * @example
221
- *
222
- * ```jsx
223
- * import { gql, useMutation } from "@apollo/client";
224
- *
225
- * const ADD_TODO = gql`
226
- * mutation AddTodo($type: String!) {
227
- * addTodo(type: $type) {
228
- * id
229
- * type
230
- * }
231
- * }
232
- * `;
233
- *
234
- * function AddTodo() {
235
- * let input;
236
- * const [addTodo, { data }] = useMutation(ADD_TODO);
237
- *
238
- * return (
239
- * <div>
240
- * <form
241
- * onSubmit={(e) => {
242
- * e.preventDefault();
243
- * addTodo({ variables: { type: input.value } });
244
- * input.value = "";
245
- * }}
246
- * >
247
- * <input
248
- * ref={(node) => {
249
- * input = node;
250
- * }}
251
- * />
252
- * <button type="submit">Add Todo</button>
253
- * </form>
254
- * </div>
255
- * );
256
- * }
257
- * ```
258
- *
259
- * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.
260
- * @param options - Options to control how the mutation is executed.
261
- * @returns A tuple in the form of `[mutate, result]`
305
+ * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.
306
+ *
307
+ * @example
308
+ *
309
+ * ```jsx
310
+ * import { gql, useMutation } from "@apollo/client";
311
+ *
312
+ * const ADD_TODO = gql`
313
+ * mutation AddTodo($type: String!) {
314
+ * addTodo(type: $type) {
315
+ * id
316
+ * type
317
+ * }
318
+ * }
319
+ * `;
320
+ *
321
+ * function AddTodo() {
322
+ * let input;
323
+ * const [addTodo, { data }] = useMutation(ADD_TODO);
324
+ *
325
+ * return (
326
+ * <div>
327
+ * <form
328
+ * onSubmit={(e) => {
329
+ * e.preventDefault();
330
+ * addTodo({ variables: { type: input.value } });
331
+ * input.value = "";
332
+ * }}
333
+ * >
334
+ * <input
335
+ * ref={(node) => {
336
+ * input = node;
337
+ * }}
338
+ * />
339
+ * <button type="submit">Add Todo</button>
340
+ * </form>
341
+ * </div>
342
+ * );
343
+ * }
344
+ * ```
345
+ *
346
+ * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.
347
+ * @param options - Options to control how the mutation is executed.
348
+ * @returns A tuple in the form of `[mutate, result]`
349
+ */
350
+ interface useMutation {
351
+ <TData = unknown, TVariables extends OperationVariables = OperationVariables>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: Options<TData, TVariables>): ResultTuple<TData, TVariables>;
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.
262
356
  */
263
- function useMutation<TData = unknown, TVariables extends OperationVariables = OperationVariables>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useMutation.Options<TData, TVariables>): useMutation.ResultTuple<TData, TVariables>;
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
+ }
361
+ namespace Signatures {
362
+ /**
363
+ *
364
+ */
365
+ interface Classic {
366
+ /**
367
+ *
368
+ */
369
+ <TData = unknown, 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, {
370
+ [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never;
371
+ }> & {
372
+ /**
373
+ * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.
374
+ *
375
+ * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
376
+ *
377
+ * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.
378
+ *
379
+ * @docGroup 1. Operation options
380
+ */
381
+ errorPolicy?: TErrorPolicy;
382
+ }): useMutation.ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>, TCache, TErrorPolicy>;
383
+ }
384
+ /**
385
+ *
386
+ */
387
+ interface Modern {
388
+ /**
389
+ *
390
+ */
391
+ <TData, TVariables extends OperationVariables, TCache extends ApolloCache, TOptions extends never>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>): useMutation.ResultForOptions<TData, TVariables, TCache, Record<string, never>>;
392
+ /**
393
+ *
394
+ */
395
+ <TData, TVariables extends OperationVariables, TCache extends ApolloCache, TOptions extends useMutation.Options<NoInfer<TData>, NoInfer<TVariables>, TCache> & {
396
+ variables?: {
397
+ [K in Exclude<keyof TOptions["variables"], keyof TVariables>]?: never;
398
+ };
399
+ }, TErrorPolicy extends ErrorPolicy | undefined = undefined>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: TOptions & {
400
+ /**
401
+ * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.
402
+ *
403
+ * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
404
+ *
405
+ * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.
406
+ *
407
+ * @docGroup 1. Operation options
408
+ */
409
+ errorPolicy?: TErrorPolicy;
410
+ }): useMutation.ResultForOptions<TData, TVariables, TCache, TOptions, TErrorPolicy>;
411
+ }
412
+ type Evaluated = SignatureStyle extends "classic" ? Classic : Modern;
413
+ }
414
+ /**
415
+ *
416
+ */
417
+ interface Signature extends Signatures.Evaluated {
264
418
  }
265
419
  }
266
420
  /**
267
- * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.
268
- *
269
- * @example
270
- *
271
- * ```jsx
272
- * import { gql, useMutation } from "@apollo/client";
273
- *
274
- * const ADD_TODO = gql`
275
- * mutation AddTodo($type: String!) {
276
- * addTodo(type: $type) {
277
- * id
278
- * type
279
- * }
280
- * }
281
- * `;
282
- *
283
- * function AddTodo() {
284
- * let input;
285
- * const [addTodo, { data }] = useMutation(ADD_TODO);
286
- *
287
- * return (
288
- * <div>
289
- * <form
290
- * onSubmit={(e) => {
291
- * e.preventDefault();
292
- * addTodo({ variables: { type: input.value } });
293
- * input.value = "";
294
- * }}
295
- * >
296
- * <input
297
- * ref={(node) => {
298
- * input = node;
299
- * }}
300
- * />
301
- * <button type="submit">Add Todo</button>
302
- * </form>
303
- * </div>
304
- * );
305
- * }
306
- * ```
307
- *
308
- * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.
309
- * @param options - Options to control how the mutation is executed.
310
- * @returns A tuple in the form of `[mutate, result]`
311
- */
312
- export declare function useMutation<TData = unknown, TVariables extends OperationVariables = OperationVariables, TCache extends ApolloCache = ApolloCache, TConfiguredVariables extends Partial<TVariables> = {}>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useMutation.Options<NoInfer<TData>, NoInfer<TVariables>, TCache, {
313
- [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never;
314
- }>): useMutation.ResultTuple<TData, MakeRequiredVariablesOptional<TVariables, TConfiguredVariables>, TCache>;
421
+ *
422
+ */
423
+ export declare const useMutation: useMutation.Signature;
315
424
  export {};
316
425
  //# sourceMappingURL=useMutation.d.cts.map