@apollo/client 4.0.0-alpha.2 → 4.0.0-alpha.4

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 (150) hide show
  1. package/.changeset/eighty-squids-fix.md +15 -0
  2. package/.changeset/four-ghosts-watch.md +5 -0
  3. package/.changeset/funny-jeans-invent.md +16 -0
  4. package/.changeset/khaki-spies-work.md +11 -0
  5. package/.changeset/light-apes-rescue.md +5 -0
  6. package/.changeset/odd-lemons-relax.md +5 -0
  7. package/.changeset/pre.json +7 -0
  8. package/.changeset/unlucky-kiwis-sell.md +5 -0
  9. package/CHANGELOG.md +58 -0
  10. package/__cjs/core/ApolloClient.cjs +22 -13
  11. package/__cjs/core/ApolloClient.cjs.map +1 -1
  12. package/__cjs/core/ApolloClient.d.cts +13 -1
  13. package/__cjs/core/ObservableQuery.cjs +29 -10
  14. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  15. package/__cjs/core/ObservableQuery.d.cts +6 -3
  16. package/__cjs/core/QueryInfo.cjs +8 -7
  17. package/__cjs/core/QueryInfo.cjs.map +1 -1
  18. package/__cjs/core/QueryInfo.d.cts +1 -0
  19. package/__cjs/core/QueryManager.cjs +36 -10
  20. package/__cjs/core/QueryManager.cjs.map +1 -1
  21. package/__cjs/core/QueryManager.d.cts +11 -0
  22. package/__cjs/core/watchQueryOptions.d.cts +18 -25
  23. package/__cjs/react/hooks/index.cjs +13 -8
  24. package/__cjs/react/hooks/index.cjs.map +1 -1
  25. package/__cjs/react/hooks/index.d.cts +6 -12
  26. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  27. package/__cjs/react/hooks/useBackgroundQuery.d.cts +146 -43
  28. package/__cjs/react/hooks/useFragment.cjs.map +1 -1
  29. package/__cjs/react/hooks/useFragment.d.cts +51 -26
  30. package/__cjs/react/hooks/useLazyQuery.cjs +1 -1
  31. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  32. package/__cjs/react/hooks/useLazyQuery.d.cts +263 -266
  33. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  34. package/__cjs/react/hooks/useLoadableQuery.d.cts +105 -32
  35. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  36. package/__cjs/react/hooks/useMutation.d.cts +198 -3
  37. package/__cjs/react/hooks/useQuery.cjs +9 -12
  38. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  39. package/__cjs/react/hooks/useQuery.d.cts +279 -4
  40. package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
  41. package/__cjs/react/hooks/useQueryRefHandlers.d.cts +21 -20
  42. package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
  43. package/__cjs/react/hooks/useReadQuery.d.cts +26 -24
  44. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  45. package/__cjs/react/hooks/useSubscription.d.cts +127 -4
  46. package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
  47. package/__cjs/react/hooks/useSuspenseFragment.d.cts +40 -37
  48. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  49. package/__cjs/react/hooks/useSuspenseQuery.d.cts +202 -35
  50. package/__cjs/react/index.cjs.map +1 -1
  51. package/__cjs/react/index.d.cts +2 -1
  52. package/__cjs/react/internal/cache/QueryReference.cjs +2 -8
  53. package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
  54. package/__cjs/react/internal/index.cjs.map +1 -1
  55. package/__cjs/react/internal/index.d.cts +1 -0
  56. package/__cjs/react/internal/types.d.cts +46 -0
  57. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  58. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +2 -3
  59. package/__cjs/react/ssr/RenderPromises.cjs.map +1 -1
  60. package/__cjs/react/ssr/RenderPromises.d.cts +6 -3
  61. package/__cjs/react/types/deprecated.cjs +3 -0
  62. package/__cjs/react/types/deprecated.cjs.map +1 -0
  63. package/__cjs/react/types/deprecated.d.cts +65 -0
  64. package/__cjs/react/types/types.documentation.d.cts +0 -8
  65. package/__cjs/testing/matchers/index.cjs +2 -0
  66. package/__cjs/testing/matchers/index.cjs.map +1 -1
  67. package/__cjs/testing/matchers/toEqualLazyQueryResult.cjs.map +1 -1
  68. package/__cjs/testing/matchers/toEqualLazyQueryResult.d.cts +2 -2
  69. package/__cjs/testing/matchers/toEqualQueryResult.cjs +0 -1
  70. package/__cjs/testing/matchers/toEqualQueryResult.cjs.map +1 -1
  71. package/__cjs/testing/matchers/toEqualQueryResult.d.cts +3 -3
  72. package/__cjs/testing/matchers/toEqualStrictTyped.cjs +44 -0
  73. package/__cjs/testing/matchers/toEqualStrictTyped.cjs.map +1 -0
  74. package/__cjs/testing/matchers/toEqualStrictTyped.d.cts +3 -0
  75. package/__cjs/version.cjs +1 -1
  76. package/__cjs/version.d.cts +1 -1
  77. package/core/ApolloClient.d.ts +13 -1
  78. package/core/ApolloClient.js +22 -13
  79. package/core/ApolloClient.js.map +1 -1
  80. package/core/ObservableQuery.d.ts +6 -3
  81. package/core/ObservableQuery.js +29 -10
  82. package/core/ObservableQuery.js.map +1 -1
  83. package/core/QueryInfo.d.ts +1 -0
  84. package/core/QueryInfo.js +8 -7
  85. package/core/QueryInfo.js.map +1 -1
  86. package/core/QueryManager.d.ts +11 -0
  87. package/core/QueryManager.js +36 -10
  88. package/core/QueryManager.js.map +1 -1
  89. package/core/watchQueryOptions.d.ts +18 -25
  90. package/package.json +1 -1
  91. package/react/hooks/index.d.ts +6 -12
  92. package/react/hooks/index.js +6 -6
  93. package/react/hooks/index.js.map +1 -1
  94. package/react/hooks/useBackgroundQuery.d.ts +146 -43
  95. package/react/hooks/useBackgroundQuery.js.map +1 -1
  96. package/react/hooks/useFragment.d.ts +51 -26
  97. package/react/hooks/useFragment.js.map +1 -1
  98. package/react/hooks/useLazyQuery.d.ts +263 -266
  99. package/react/hooks/useLazyQuery.js +1 -1
  100. package/react/hooks/useLazyQuery.js.map +1 -1
  101. package/react/hooks/useLoadableQuery.d.ts +105 -32
  102. package/react/hooks/useLoadableQuery.js.map +1 -1
  103. package/react/hooks/useMutation.d.ts +198 -3
  104. package/react/hooks/useMutation.js.map +1 -1
  105. package/react/hooks/useQuery.d.ts +279 -4
  106. package/react/hooks/useQuery.js +9 -12
  107. package/react/hooks/useQuery.js.map +1 -1
  108. package/react/hooks/useQueryRefHandlers.d.ts +21 -20
  109. package/react/hooks/useQueryRefHandlers.js.map +1 -1
  110. package/react/hooks/useReadQuery.d.ts +26 -24
  111. package/react/hooks/useReadQuery.js.map +1 -1
  112. package/react/hooks/useSubscription.d.ts +127 -4
  113. package/react/hooks/useSubscription.js.map +1 -1
  114. package/react/hooks/useSuspenseFragment.d.ts +40 -37
  115. package/react/hooks/useSuspenseFragment.js.map +1 -1
  116. package/react/hooks/useSuspenseQuery.d.ts +202 -35
  117. package/react/hooks/useSuspenseQuery.js.map +1 -1
  118. package/react/index.d.ts +2 -1
  119. package/react/index.js.map +1 -1
  120. package/react/internal/cache/QueryReference.js +2 -8
  121. package/react/internal/cache/QueryReference.js.map +1 -1
  122. package/react/internal/index.d.ts +1 -0
  123. package/react/internal/index.js.map +1 -1
  124. package/react/internal/types.d.ts +46 -0
  125. package/react/query-preloader/createQueryPreloader.d.ts +2 -3
  126. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  127. package/react/ssr/RenderPromises.d.ts +6 -3
  128. package/react/ssr/RenderPromises.js.map +1 -1
  129. package/react/types/deprecated.d.ts +65 -0
  130. package/react/types/deprecated.js +2 -0
  131. package/react/types/deprecated.js.map +1 -0
  132. package/react/types/types.documentation.d.ts +0 -8
  133. package/testing/matchers/index.js +2 -0
  134. package/testing/matchers/index.js.map +1 -1
  135. package/testing/matchers/toEqualLazyQueryResult.d.ts +2 -2
  136. package/testing/matchers/toEqualLazyQueryResult.js.map +1 -1
  137. package/testing/matchers/toEqualQueryResult.d.ts +3 -3
  138. package/testing/matchers/toEqualQueryResult.js +0 -1
  139. package/testing/matchers/toEqualQueryResult.js.map +1 -1
  140. package/testing/matchers/toEqualStrictTyped.d.ts +3 -0
  141. package/testing/matchers/toEqualStrictTyped.js +40 -0
  142. package/testing/matchers/toEqualStrictTyped.js.map +1 -0
  143. package/version.d.ts +1 -1
  144. package/version.js +1 -1
  145. package/__cjs/react/types/types.d.cts +0 -671
  146. package/react/types/types.d.ts +0 -671
  147. /package/__cjs/react/{types → internal}/types.cjs +0 -0
  148. /package/__cjs/react/{types → internal}/types.cjs.map +0 -0
  149. /package/react/{types → internal}/types.js +0 -0
  150. /package/react/{types → internal}/types.js.map +0 -0
@@ -1,59 +1,132 @@
1
- import type { DocumentNode, OperationVariables, TypedDocumentNode } from "@apollo/client/core";
1
+ import type { ApolloClient, DefaultContext, DocumentNode, ErrorPolicy, OperationVariables, RefetchWritePolicy, TypedDocumentNode, WatchQueryFetchPolicy } from "@apollo/client/core";
2
2
  import type { SubscribeToMoreFunction } from "@apollo/client/core";
3
- import type { LoadableQueryHookOptions } from "@apollo/client/react";
4
- import type { QueryRef } from "@apollo/client/react/internal";
3
+ import type { FetchMoreFunction, QueryRef, RefetchFunction } from "@apollo/client/react/internal";
5
4
  import type { DeepPartial, OnlyRequiredProperties } from "@apollo/client/utilities";
6
- import type { FetchMoreFunction, RefetchFunction } from "./useSuspenseQuery.cjs";
7
- export type LoadQueryFunction<TVariables extends OperationVariables> = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties<TVariables> ? [variables?: TVariables] : [variables: TVariables]) => void;
8
5
  type ResetFunction = () => void;
9
- export type UseLoadableQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = [
10
- loadQuery: LoadQueryFunction<TVariables>,
11
- queryRef: QueryRef<TData, TVariables> | null,
12
- handlers: {
6
+ export declare namespace useLoadableQuery {
7
+ type LoadQueryFunction<TVariables extends OperationVariables> = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties<TVariables> ? [variables?: TVariables] : [variables: TVariables]) => void;
8
+ type Result<TData = unknown, TVariables extends OperationVariables = OperationVariables> = [
9
+ loadQuery: LoadQueryFunction<TVariables>,
10
+ queryRef: QueryRef<TData, TVariables> | null,
11
+ handlers: {
12
+ /**
13
+ * A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).
14
+ *
15
+ *
16
+ * @docGroup
17
+ *
18
+ * 3. Helper functions
19
+ */
20
+ fetchMore: FetchMoreFunction<TData, TVariables>;
21
+ /**
22
+ * A function that enables you to re-execute the query, optionally passing in new `variables`.
23
+ *
24
+ * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).
25
+ *
26
+ * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).
27
+ *
28
+ * @docGroup
29
+ *
30
+ * 3. Helper functions
31
+ */
32
+ refetch: RefetchFunction<TData, TVariables>;
33
+ /**
34
+ * A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.
35
+ *
36
+ * This function returns _another_ function that you can call to terminate the subscription.
37
+ */
38
+ subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;
39
+ /**
40
+ * A function that resets the `queryRef` back to `null`.
41
+ */
42
+ reset: ResetFunction;
43
+ }
44
+ ];
45
+ type FetchPolicy = Extract<WatchQueryFetchPolicy, "cache-first" | "network-only" | "no-cache" | "cache-and-network">;
46
+ interface Options {
13
47
  /**
14
- * A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).
48
+ * The instance of `ApolloClient` to use to execute the query.
15
49
  *
50
+ * By default, the instance that's passed down via context is used, but you can provide a different instance here.
16
51
  *
17
52
  * @docGroup
18
53
  *
19
- * 3. Helper functions
54
+ * 1. Operation options
20
55
  */
21
- fetchMore: FetchMoreFunction<TData, TVariables>;
56
+ client?: ApolloClient;
22
57
  /**
23
- * A function that enables you to re-execute the query, optionally passing in new `variables`.
58
+ * 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.
24
59
  *
25
- * To guarantee that the refetch performs a network request, its `fetchPolicy` is set to `network-only` (unless the original query's `fetchPolicy` is `no-cache` or `cache-and-network`, which also guarantee a network request).
60
+ * @docGroup
61
+ *
62
+ * 2. Networking options
63
+ */
64
+ context?: DefaultContext;
65
+ /**
66
+ * Specifies how the query handles a response that returns both GraphQL errors and partial results.
26
67
  *
27
- * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).
68
+ * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
69
+ *
70
+ * The default value is `none`, meaning that the query result includes error details but not partial results.
28
71
  *
29
72
  * @docGroup
30
73
  *
31
- * 3. Helper functions
74
+ * 1. Operation options
32
75
  */
33
- refetch: RefetchFunction<TData, TVariables>;
76
+ errorPolicy?: ErrorPolicy;
34
77
  /**
35
- * A function that enables you to execute a [subscription](https://www.apollographql.com/docs/react/data/subscriptions/), usually to subscribe to specific fields that were included in the query.
78
+ * Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).
79
+ *
80
+ * For details, see [Setting a fetch policy](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy).
81
+ *
82
+ * The default value is `cache-first`.
36
83
  *
37
- * This function returns _another_ function that you can call to terminate the subscription.
84
+ * @docGroup
85
+ *
86
+ * 3. Caching options
38
87
  */
39
- subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;
88
+ fetchPolicy?: FetchPolicy;
40
89
  /**
41
- * A function that resets the `queryRef` back to `null`.
42
- */
43
- reset: ResetFunction;
90
+ * A unique identifier for the query. Each item in the array must be a stable identifier to prevent infinite fetches.
91
+ *
92
+ * This is useful when using the same query and variables combination in more than one component, otherwise the components may clobber each other. This can also be used to force the query to re-evaluate fresh.
93
+ *
94
+ * @docGroup
95
+ *
96
+ * 1. Operation options
97
+ */
98
+ queryKey?: string | number | any[];
99
+ /**
100
+ * Specifies whether a `NetworkStatus.refetch` operation should merge incoming field data with existing data, or overwrite the existing data. Overwriting is probably preferable, but merging is currently the default behavior, for backwards compatibility with Apollo Client 3.x.
101
+ *
102
+ * @docGroup
103
+ *
104
+ * 3. Caching options
105
+ */
106
+ refetchWritePolicy?: RefetchWritePolicy;
107
+ /**
108
+ * If `true`, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.
109
+ *
110
+ * The default value is `false`.
111
+ *
112
+ * @docGroup
113
+ *
114
+ * 3. Caching options
115
+ */
116
+ returnPartialData?: boolean;
44
117
  }
45
- ];
46
- export declare function useLoadableQuery<TData, TVariables extends OperationVariables, TOptions extends LoadableQueryHookOptions>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables>;
47
- export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
118
+ }
119
+ export declare function useLoadableQuery<TData, TVariables extends OperationVariables, TOptions extends useLoadableQuery.Options>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useLoadableQuery.Options & TOptions): useLoadableQuery.Result<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables>;
120
+ export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
48
121
  returnPartialData: true;
49
122
  errorPolicy: "ignore" | "all";
50
- }): UseLoadableQueryResult<DeepPartial<TData> | undefined, TVariables>;
51
- export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
123
+ }): useLoadableQuery.Result<DeepPartial<TData> | undefined, TVariables>;
124
+ export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
52
125
  errorPolicy: "ignore" | "all";
53
- }): UseLoadableQueryResult<TData | undefined, TVariables>;
54
- export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
126
+ }): useLoadableQuery.Result<TData | undefined, TVariables>;
127
+ export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useLoadableQuery.Options & {
55
128
  returnPartialData: true;
56
- }): UseLoadableQueryResult<DeepPartial<TData>, TVariables>;
129
+ }): useLoadableQuery.Result<DeepPartial<TData>, TVariables>;
57
130
  /**
58
131
  * A hook for imperatively loading a query, such as responding to a user
59
132
  * interaction.
@@ -99,6 +172,6 @@ export declare function useLoadableQuery<TData = unknown, TVariables extends Ope
99
172
  * @param options - Options to control how the query is executed.
100
173
  * @returns A tuple in the form of `[loadQuery, queryRef, handlers]`
101
174
  */
102
- export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: LoadableQueryHookOptions): UseLoadableQueryResult<TData, TVariables>;
175
+ export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useLoadableQuery.Options): useLoadableQuery.Result<TData, TVariables>;
103
176
  export {};
104
177
  //# sourceMappingURL=useLoadableQuery.d.cts.map
@@ -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 type { DocumentNode } from \"graphql\";\nimport * as React from \"react\";\n\nimport type {\n ApolloCache,\n DefaultContext,\n MutationOptions,\n OperationVariables,\n} from \"@apollo/client/core\";\nimport { CombinedGraphQLErrors } from \"@apollo/client/errors\";\nimport type {\n MutationFunctionOptions,\n MutationHookOptions,\n MutationResult,\n MutationTuple,\n NoInfer,\n} from \"@apollo/client/react\";\nimport { DocumentType, verifyDocumentType } from \"@apollo/client/react/parser\";\nimport { mergeOptions } from \"@apollo/client/utilities\";\n\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\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 * ```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 * @since 3.0.0\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 = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n>(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: MutationHookOptions<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TContext,\n TCache\n >\n): MutationTuple<TData, TVariables, TContext, TCache> {\n const client = useApolloClient(options?.client);\n verifyDocumentType(mutation, DocumentType.Mutation);\n const [result, setResult] = React.useState<\n Omit<MutationResult<TData>, \"reset\">\n >({\n called: false,\n loading: false,\n client,\n });\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: MutationFunctionOptions<\n TData,\n TVariables,\n TContext,\n TCache\n > = {}\n ) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult(\n (ref.current.result = {\n loading: true,\n error: void 0,\n data: void 0,\n called: true,\n client,\n })\n );\n }\n\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, executeOptions);\n\n return client\n .mutate(clientOptions as MutationOptions<TData, OperationVariables>)\n .then(\n (response) => {\n const { data, errors } = response;\n const error =\n errors && errors.length > 0 ?\n new CombinedGraphQLErrors(errors)\n : void 0;\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 (ref.current.isMounted && !equal(ref.current.result, result)) {\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 // TODO(brian): why are we returning this here???\n return { data: void 0, errors: error };\n }\n\n throw error;\n }\n );\n },\n []\n );\n\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = {\n called: false,\n loading: false,\n client: ref.current.client,\n };\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, { reset, ...result }];\n}\n"],"names":[],"mappings":";;AAwEA,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;;AAvEA,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;AAEA,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;AAQA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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B,CAAC;IACH,CAAC,EAAE,CAAL,CAAO,CAAC;IAEN,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAC,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,EAAE,EAAE,CAArB,CAAA,CAAA,CAAA,CAA0B,EAAE,CAA5B,CAAA,CAA+B,CAA/B,CAAA,CAAA,CAAA,CAAA,EAAA,CAAuC,CAAC;AACxC;"}
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 type { DocumentNode } from \"graphql\";\nimport * as React from \"react\";\n\nimport type {\n ApolloCache,\n ApolloClient,\n DefaultContext,\n ErrorLike,\n ErrorPolicy,\n FetchResult,\n InternalRefetchQueriesInclude,\n MaybeMasked,\n MutationFetchPolicy,\n MutationOptions,\n MutationQueryReducersMap,\n MutationUpdaterFunction,\n OnQueryUpdated,\n OperationVariables,\n Unmasked,\n} from \"@apollo/client/core\";\nimport { CombinedGraphQLErrors } from \"@apollo/client/errors\";\nimport { DocumentType, verifyDocumentType } from \"@apollo/client/react/parser\";\nimport type { NoInfer } from \"@apollo/client/utilities\";\nimport { mergeOptions } from \"@apollo/client/utilities\";\n\nimport type { IgnoreModifier } from \"../../cache/core/types/common.js\";\n\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n\nexport declare namespace useMutation {\n export interface Options<\n TData = unknown,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\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: FetchResult<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, TContext, 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?: TVariables;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#context:member} */\n context?: TContext;\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, TContext, TCache>\n ) => void;\n\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#onError:member} */\n onError?: (\n error: ErrorLike,\n clientOptions?: Options<TData, TVariables, TContext, TCache>\n ) => void;\n }\n\n export interface Result<TData = unknown> {\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#data:member} */\n data?: MaybeMasked<TData> | null;\n\n /** {@inheritDoc @apollo/client!MutationResultDocumentation#error:member} */\n error?: ErrorLike;\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,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n > = [\n mutate: (\n options?: MutationFunctionOptions<TData, TVariables, TContext, TCache>\n // TODO This FetchResult<TData> seems strange here, as opposed to an\n // ApolloQueryResult<TData>\n ) => Promise<FetchResult<MaybeMasked<TData>>>,\n result: Result<TData>,\n ];\n\n export interface MutationFunctionOptions<\n TData = unknown,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n > extends Options<TData, TVariables, TContext, TCache> {\n /** {@inheritDoc @apollo/client!MutationOptionsDocumentation#mutation:member} */\n // TODO: Remove this option. We shouldn't allow the mutation to be overridden\n // in the mutation function\n mutation?: DocumentNode | TypedDocumentNode<TData, TVariables>;\n }\n}\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 * ```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 * @since 3.0.0\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 = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache = ApolloCache,\n>(\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: useMutation.Options<\n NoInfer<TData>,\n NoInfer<TVariables>,\n TContext,\n TCache\n >\n): useMutation.ResultTuple<TData, TVariables, TContext, TCache> {\n const client = useApolloClient(options?.client);\n verifyDocumentType(mutation, DocumentType.Mutation);\n const [result, setResult] = React.useState<\n Omit<useMutation.Result<TData>, \"reset\">\n >({\n called: false,\n loading: false,\n client,\n });\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 TContext,\n TCache\n > = {}\n ) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult(\n (ref.current.result = {\n loading: true,\n error: void 0,\n data: void 0,\n called: true,\n client,\n })\n );\n }\n\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, executeOptions);\n\n return client\n .mutate(clientOptions as MutationOptions<TData, OperationVariables>)\n .then(\n (response) => {\n const { data, errors } = response;\n const error =\n errors && errors.length > 0 ?\n new CombinedGraphQLErrors(errors)\n : void 0;\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 (ref.current.isMounted && !equal(ref.current.result, result)) {\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 // TODO(brian): why are we returning this here???\n return { data: void 0, errors: error };\n }\n\n throw error;\n }\n );\n },\n []\n );\n\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = {\n called: false,\n loading: false,\n client: ref.current.client,\n };\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, { reset, ...result }];\n}\n"],"names":[],"mappings":";;AAkMA,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;;AAjMA,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;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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AA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAC,CAAZ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAwB,CAAxB,CAAA,CAAA,CAA4B;QAExB,CAAJ,CAAA,CAAA,CAAA,CAAA,EAAW,CAAX,EAAc,CAAd,EAAA;YACM,CAAN,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAC,CAAd,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAA0B,CAA1B,CAAA,CAAA,CAAA,CAA+B;QAC3B,CAAC;IACH,CAAC,EAAE,CAAL,CAAO,CAAC;IAEN,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAC,CAAV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,EAAE,EAAE,CAArB,CAAA,CAAA,CAAA,CAA0B,EAAE,CAA5B,CAAA,CAA+B,CAA/B,CAAA,CAAA,CAAA,CAAA,EAAA,CAAuC,CAAC;AACxC;"}
@@ -1,7 +1,202 @@
1
1
  import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
2
2
  import type { DocumentNode } from "graphql";
3
- import type { ApolloCache, DefaultContext, OperationVariables } from "@apollo/client/core";
4
- import type { MutationHookOptions, MutationTuple, NoInfer } from "@apollo/client/react";
3
+ import type { ApolloCache, ApolloClient, DefaultContext, ErrorLike, ErrorPolicy, FetchResult, InternalRefetchQueriesInclude, MaybeMasked, MutationFetchPolicy, MutationQueryReducersMap, MutationUpdaterFunction, OnQueryUpdated, OperationVariables, Unmasked } from "@apollo/client/core";
4
+ import type { NoInfer } from "@apollo/client/utilities";
5
+ import type { IgnoreModifier } from "../../cache/core/types/common.cjs";
6
+ export declare namespace useMutation {
7
+ interface Options<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> {
8
+ /**
9
+ * By providing either an object or a callback function that, when invoked after a mutation, allows you to return optimistic data and optionally skip updates via the `IGNORE` sentinel object, Apollo Client caches this temporary (and potentially incorrect) response until the mutation completes, enabling more responsive UI updates.
10
+ *
11
+ * For more information, see [Optimistic mutation results](https://www.apollographql.com/docs/react/performance/optimistic-ui/).
12
+ *
13
+ * @docGroup
14
+ *
15
+ * 3. Caching options
16
+ */
17
+ optimisticResponse?: Unmasked<NoInfer<TData>> | ((vars: TVariables, { IGNORE }: {
18
+ IGNORE: IgnoreModifier;
19
+ }) => Unmasked<NoInfer<TData>> | IgnoreModifier);
20
+ /**
21
+ * A `MutationQueryReducersMap`, which is map from query names to mutation query reducers. Briefly, this map defines how to incorporate the results of the mutation into the results of queries that are currently being watched by your application.
22
+ */
23
+ updateQueries?: MutationQueryReducersMap<TData>;
24
+ /**
25
+ * An array (or a function that _returns_ an array) that specifies which queries you want to refetch after the mutation occurs.
26
+ *
27
+ * Each array value can be either:
28
+ *
29
+ * - An object containing the `query` to execute, along with any `variables`
30
+ *
31
+ * - A string indicating the operation name of the query to refetch
32
+ *
33
+ * @docGroup
34
+ *
35
+ * 1. Operation options
36
+ */
37
+ refetchQueries?: ((result: FetchResult<Unmasked<TData>>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude;
38
+ /**
39
+ * If `true`, makes sure all queries included in `refetchQueries` are completed before the mutation is considered complete.
40
+ *
41
+ * The default value is `false` (queries are refetched asynchronously).
42
+ *
43
+ * @docGroup
44
+ *
45
+ * 1. Operation options
46
+ */
47
+ awaitRefetchQueries?: boolean;
48
+ /**
49
+ * A function used to update the Apollo Client cache after the mutation completes.
50
+ *
51
+ * For more information, see [Updating the cache after a mutation](https://www.apollographql.com/docs/react/data/mutations#updating-the-cache-after-a-mutation).
52
+ *
53
+ * @docGroup
54
+ *
55
+ * 3. Caching options
56
+ */
57
+ update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;
58
+ /**
59
+ * Optional callback for intercepting queries whose cache data has been updated by the mutation, as well as any queries specified in the `refetchQueries: [...]` list passed to `client.mutate`.
60
+ *
61
+ * Returning a `Promise` from `onQueryUpdated` will cause the final mutation `Promise` to await the returned `Promise`. Returning `false` causes the query to be ignored.
62
+ *
63
+ * @docGroup
64
+ *
65
+ * 1. Operation options
66
+ */
67
+ onQueryUpdated?: OnQueryUpdated<any>;
68
+ /**
69
+ * Specifies how the mutation handles a response that returns both GraphQL errors and partial results.
70
+ *
71
+ * For details, see [GraphQL error policies](https://www.apollographql.com/docs/react/data/error-handling/#graphql-error-policies).
72
+ *
73
+ * The default value is `none`, meaning that the mutation result includes error details but _not_ partial results.
74
+ *
75
+ * @docGroup
76
+ *
77
+ * 1. Operation options
78
+ */
79
+ errorPolicy?: ErrorPolicy;
80
+ /**
81
+ * An object containing all of the GraphQL variables your mutation requires to execute.
82
+ *
83
+ * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.
84
+ *
85
+ * @docGroup
86
+ *
87
+ * 1. Operation options
88
+ */
89
+ variables?: TVariables;
90
+ /**
91
+ * 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.
92
+ *
93
+ * @docGroup
94
+ *
95
+ * 2. Networking options
96
+ */
97
+ context?: TContext;
98
+ /**
99
+ * Provide `no-cache` if the mutation's result should _not_ be written to the Apollo Client cache.
100
+ *
101
+ * The default value is `network-only` (which means the result _is_ written to the cache).
102
+ *
103
+ * Unlike queries, mutations _do not_ support [fetch policies](https://www.apollographql.com/docs/react/data/queries/#setting-a-fetch-policy) besides `network-only` and `no-cache`.
104
+ *
105
+ * @docGroup
106
+ *
107
+ * 3. Caching options
108
+ */
109
+ fetchPolicy?: MutationFetchPolicy;
110
+ /**
111
+ * To avoid retaining sensitive information from mutation root field arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION` fields from the cache after each mutation finishes. If you need this information to remain in the cache, you can prevent the removal by passing `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are also passed to the mutation `update` function, so we recommend obtaining the results that way, rather than using this option, if possible.
112
+ */
113
+ keepRootFields?: boolean;
114
+ /**
115
+ * The instance of `ApolloClient` to use to execute the mutation.
116
+ *
117
+ * By default, the instance that's passed down via context is used, but you can provide a different instance here.
118
+ *
119
+ * @docGroup
120
+ *
121
+ * 2. Networking options
122
+ */
123
+ client?: ApolloClient;
124
+ /**
125
+ * If `true`, the in-progress mutation's associated component re-renders whenever the network status changes or a network error occurs.
126
+ *
127
+ * The default value is `false`.
128
+ *
129
+ * @docGroup
130
+ *
131
+ * 2. Networking options
132
+ */
133
+ notifyOnNetworkStatusChange?: boolean;
134
+ /**
135
+ * A callback function that's called when your mutation successfully completes with zero errors (or if `errorPolicy` is `ignore` and partial data is returned).
136
+ *
137
+ * This function is passed the mutation's result `data` and any options passed to the mutation.
138
+ *
139
+ * @docGroup
140
+ *
141
+ * 1. Operation options
142
+ */
143
+ onCompleted?: (data: MaybeMasked<TData>, clientOptions?: Options<TData, TVariables, TContext, TCache>) => void;
144
+ /**
145
+ * A callback function that's called when the mutation encounters one or more errors (unless `errorPolicy` is `ignore`).
146
+ *
147
+ * This function is passed an [`ApolloError`](https://github.com/apollographql/apollo-client/blob/d96f4578f89b933c281bb775a39503f6cdb59ee8/src/errors/index.ts#L36-L39) object that contains either a `networkError` object or a `graphQLErrors` array, depending on the error(s) that occurred, as well as any options passed the mutation.
148
+ *
149
+ * @docGroup
150
+ *
151
+ * 1. Operation options
152
+ */
153
+ onError?: (error: ErrorLike, clientOptions?: Options<TData, TVariables, TContext, TCache>) => void;
154
+ }
155
+ interface Result<TData = unknown> {
156
+ /**
157
+ * The data returned from your mutation. Can be `undefined` if `ignoreResults` is `true`.
158
+ */
159
+ data?: MaybeMasked<TData> | null;
160
+ /**
161
+ * 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`.
162
+ *
163
+ * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
164
+ */
165
+ error?: ErrorLike;
166
+ /**
167
+ * If `true`, the mutation is currently in flight.
168
+ */
169
+ loading: boolean;
170
+ /**
171
+ * If `true`, the mutation's mutate function has been called.
172
+ */
173
+ called: boolean;
174
+ /**
175
+ * The instance of Apollo Client that executed the mutation.
176
+ *
177
+ * Can be useful for manually executing followup operations or writing data to the cache.
178
+ */
179
+ client: ApolloClient;
180
+ /**
181
+ * A function that you can call to reset the mutation's result to its initial, uncalled state.
182
+ */
183
+ reset: () => void;
184
+ }
185
+ type ResultTuple<TData, TVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> = [
186
+ mutate: (options?: MutationFunctionOptions<TData, TVariables, TContext, TCache>) => Promise<FetchResult<MaybeMasked<TData>>>,
187
+ result: Result<TData>
188
+ ];
189
+ interface MutationFunctionOptions<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> extends Options<TData, TVariables, TContext, TCache> {
190
+ /**
191
+ * A GraphQL document, often created with `gql` from the `graphql-tag` package, that contains a single mutation inside of it.
192
+ *
193
+ * @docGroup
194
+ *
195
+ * 1. Operation options
196
+ */
197
+ mutation?: DocumentNode | TypedDocumentNode<TData, TVariables>;
198
+ }
199
+ }
5
200
  /**
6
201
  *
7
202
  *
@@ -49,5 +244,5 @@ import type { MutationHookOptions, MutationTuple, NoInfer } from "@apollo/client
49
244
  * @param options - Options to control how the mutation is executed.
50
245
  * @returns A tuple in the form of `[mutate, result]`
51
246
  */
52
- export declare function useMutation<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: MutationHookOptions<NoInfer<TData>, NoInfer<TVariables>, TContext, TCache>): MutationTuple<TData, TVariables, TContext, TCache>;
247
+ export declare function useMutation<TData = unknown, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useMutation.Options<NoInfer<TData>, NoInfer<TVariables>, TContext, TCache>): useMutation.ResultTuple<TData, TVariables, TContext, TCache>;
53
248
  //# sourceMappingURL=useMutation.d.cts.map
@@ -14,7 +14,7 @@ const tslib_1 = require("tslib");
14
14
  * watchQueryOptions
15
15
  * makeWatchQueryOptions
16
16
  * isSSRAllowed
17
- * disableNetworkFetches
17
+ * prioritizeCacheValues
18
18
  * renderPromises
19
19
  * isSyncSSR
20
20
  */
@@ -26,7 +26,6 @@ const core_1 = require("@apollo/client/core");
26
26
  const context_1 = require("@apollo/client/react/context");
27
27
  const parser_1 = require("@apollo/client/react/parser");
28
28
  const utilities_1 = require("@apollo/client/utilities");
29
- const utilities_2 = require("@apollo/client/utilities");
30
29
  const index_js_1 = require("./internal/index.cjs");
31
30
  const useApolloClient_js_1 = require("./useApolloClient.cjs");
32
31
  const useSyncExternalStore_js_1 = require("./useSyncExternalStore.cjs");
@@ -114,7 +113,7 @@ function useQueryInternals(query, options) {
114
113
  const client = (0, useApolloClient_js_1.useApolloClient)(options.client);
115
114
  const renderPromises = React.useContext((0, context_1.getApolloContext)()).renderPromises;
116
115
  const isSyncSSR = !!renderPromises;
117
- const disableNetworkFetches = client.disableNetworkFetches;
116
+ const prioritizeCacheValues = client.prioritizeCacheValues;
118
117
  const ssrAllowed = options.ssr !== false && !options.skip;
119
118
  const makeWatchQueryOptions = createMakeWatchQueryOptions(client, query, options, isSyncSSR);
120
119
  const { observable, resultData } = useInternalState(client, query, renderPromises, makeWatchQueryOptions);
@@ -123,11 +122,11 @@ function useQueryInternals(query, options) {
123
122
  observable, // might get mutated during render
124
123
  client, watchQueryOptions);
125
124
  useRegisterSSRObservable(observable, renderPromises, ssrAllowed);
126
- const result = useObservableSubscriptionResult(resultData, observable, client, options, watchQueryOptions, disableNetworkFetches, isSyncSSR);
125
+ const result = useObservableSubscriptionResult(resultData, observable, client, options, watchQueryOptions, prioritizeCacheValues, isSyncSSR);
127
126
  return result;
128
127
  }
129
- function useObservableSubscriptionResult(resultData, observable, client, options, watchQueryOptions, disableNetworkFetches, isSyncSSR) {
130
- const resultOverride = ((isSyncSSR || disableNetworkFetches) &&
128
+ function useObservableSubscriptionResult(resultData, observable, client, options, watchQueryOptions, prioritizeCacheValues, isSyncSSR) {
129
+ const resultOverride = ((isSyncSSR || prioritizeCacheValues) &&
131
130
  options.ssr === false &&
132
131
  !options.skip) ?
133
132
  // If SSR has been explicitly disabled, and this function has been called
@@ -150,9 +149,9 @@ function useObservableSubscriptionResult(resultData, observable, client, options
150
149
  const currentResultOverride = React.useMemo(() => resultOverride &&
151
150
  toQueryResult(resultOverride, previousData, observable, client), [client, observable, resultOverride, previousData]);
152
151
  return (0, useSyncExternalStore_js_1.useSyncExternalStore)(React.useCallback((handleStoreChange) => {
153
- // reference `disableNetworkFetches` here to ensure that the rules of hooks
152
+ // reference `prioritizeCacheValues` here to ensure that the rules of hooks
154
153
  // keep it as a dependency of this effect, even though it's not used
155
- disableNetworkFetches;
154
+ prioritizeCacheValues;
156
155
  if (isSyncSSR) {
157
156
  return () => { };
158
157
  }
@@ -185,7 +184,7 @@ function useObservableSubscriptionResult(resultData, observable, client, options
185
184
  return () => {
186
185
  setTimeout(() => subscription.unsubscribe());
187
186
  };
188
- }, [disableNetworkFetches, isSyncSSR, observable, resultData, client]), () => currentResultOverride || getCurrentResult(resultData, observable, client), () => currentResultOverride || getCurrentResult(resultData, observable, client));
187
+ }, [prioritizeCacheValues, isSyncSSR, observable, resultData, client]), () => currentResultOverride || getCurrentResult(resultData, observable, client), () => currentResultOverride || getCurrentResult(resultData, observable, client));
189
188
  }
190
189
  function useRegisterSSRObservable(observable, renderPromises, ssrAllowed) {
191
190
  if (renderPromises && ssrAllowed) {
@@ -280,7 +279,7 @@ function getObsQueryOptions(observable, client, watchQueryOptions) {
280
279
  // variables always have values, if not otherwise defined in
281
280
  // observable.options or watchQueryOptions.
282
281
  toMerge.push((0, utilities_1.compact)(observable && observable.options, watchQueryOptions));
283
- return toMerge.reduce(utilities_2.mergeOptions);
282
+ return toMerge.reduce(utilities_1.mergeOptions);
284
283
  }
285
284
  function setResult(nextResult, resultData, observable, client, forceUpdate) {
286
285
  const previousResult = resultData.current;
@@ -309,7 +308,6 @@ function toQueryResult(result, previousData, observable, client) {
309
308
  client: client,
310
309
  observable: observable,
311
310
  variables: observable.variables,
312
- called: result !== ssrDisabledResult && result !== skipStandbyResult,
313
311
  previousData,
314
312
  };
315
313
  return queryResult;
@@ -331,7 +329,6 @@ const skipStandbyResult = (0, utilities_1.maybeDeepFreeze)({
331
329
  function bindObservableMethods(observable) {
332
330
  return {
333
331
  refetch: observable.refetch.bind(observable),
334
- reobserve: observable.reobserve.bind(observable),
335
332
  fetchMore: observable.fetchMore.bind(observable),
336
333
  updateQuery: observable.updateQuery.bind(observable),
337
334
  startPolling: observable.startPolling.bind(observable),