@apollo/client 3.13.8 → 3.14.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/.changeset/chilled-cameras-scream.md +5 -0
  2. package/.changeset/great-suns-cover.md +5 -0
  3. package/.changeset/perfect-donuts-roll.md +5 -0
  4. package/.changeset/popular-waves-drop.md +5 -0
  5. package/.changeset/pre.json +16 -0
  6. package/.changeset/shy-dragons-tease.md +5 -0
  7. package/.changeset/smooth-countries-cough.md +5 -0
  8. package/.changeset/spotty-walls-repair.md +5 -0
  9. package/CHANGELOG.md +20 -0
  10. package/README.md +80 -31
  11. package/apollo-client.cjs +354 -132
  12. package/apollo-client.cjs.map +1 -1
  13. package/apollo-client.min.cjs +1 -1
  14. package/cache/cache.cjs +78 -21
  15. package/cache/cache.cjs.map +1 -1
  16. package/cache/cache.cjs.native.js +78 -21
  17. package/cache/core/cache.js +27 -4
  18. package/cache/core/cache.js.map +1 -1
  19. package/cache/core/types/Cache.d.ts +4 -4
  20. package/cache/core/types/Cache.js.map +1 -1
  21. package/cache/core/types/DataProxy.d.ts +2 -2
  22. package/cache/inmemory/inMemoryCache.js +15 -4
  23. package/cache/inmemory/inMemoryCache.js.map +1 -1
  24. package/cache/inmemory/policies.js +18 -13
  25. package/cache/inmemory/policies.js.map +1 -1
  26. package/cache/inmemory/readFromStore.d.ts +7 -0
  27. package/cache/inmemory/readFromStore.js.map +1 -1
  28. package/cache/inmemory/types.d.ts +14 -3
  29. package/cache/inmemory/types.js.map +1 -1
  30. package/core/ApolloClient.d.ts +191 -2
  31. package/core/ApolloClient.js +93 -7
  32. package/core/ApolloClient.js.map +1 -1
  33. package/core/LocalState.js +2 -2
  34. package/core/ObservableQuery.js +10 -6
  35. package/core/ObservableQuery.js.map +1 -1
  36. package/core/QueryInfo.js +8 -2
  37. package/core/QueryInfo.js.map +1 -1
  38. package/core/QueryManager.js +15 -12
  39. package/core/QueryManager.js.map +1 -1
  40. package/core/core.cjs +93 -30
  41. package/core/core.cjs.map +1 -1
  42. package/core/core.cjs.native.js +93 -30
  43. package/core/watchQueryOptions.d.ts +2 -2
  44. package/dev/dev.cjs +144 -84
  45. package/dev/dev.cjs.map +1 -1
  46. package/dev/dev.cjs.native.js +144 -84
  47. package/invariantErrorCodes.js +158 -83
  48. package/link/core/ApolloLink.js +2 -2
  49. package/link/core/core.cjs +2 -2
  50. package/link/core/core.cjs.map +1 -1
  51. package/link/core/core.cjs.native.js +2 -2
  52. package/link/http/checkFetcher.js +1 -1
  53. package/link/http/createHttpLink.js +1 -1
  54. package/link/http/http.cjs +3 -3
  55. package/link/http/http.cjs.map +1 -1
  56. package/link/http/http.cjs.native.js +3 -3
  57. package/link/http/serializeFetchParameter.js +1 -1
  58. package/link/persisted-queries/index.js +2 -2
  59. package/link/persisted-queries/persisted-queries.cjs +2 -2
  60. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  61. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  62. package/link/utils/toPromise.js +1 -1
  63. package/link/utils/utils.cjs +2 -2
  64. package/link/utils/utils.cjs.map +1 -1
  65. package/link/utils/utils.cjs.native.js +2 -2
  66. package/link/utils/validateOperation.js +1 -1
  67. package/masking/maskDefinition.js +2 -2
  68. package/masking/maskFragment.js +2 -2
  69. package/masking/maskOperation.js +1 -1
  70. package/masking/masking.cjs +6 -6
  71. package/masking/masking.cjs.map +1 -1
  72. package/masking/masking.cjs.native.js +6 -6
  73. package/masking/utils.js +1 -1
  74. package/package.json +1 -1
  75. package/react/components/Mutation.js +5 -0
  76. package/react/components/Mutation.js.map +1 -1
  77. package/react/components/Query.js +5 -0
  78. package/react/components/Query.js.map +1 -1
  79. package/react/components/Subscription.js +5 -0
  80. package/react/components/Subscription.js.map +1 -1
  81. package/react/components/components.cjs +34 -0
  82. package/react/components/components.cjs.map +1 -1
  83. package/react/components/components.cjs.native.js +34 -0
  84. package/react/context/ApolloConsumer.js +1 -1
  85. package/react/context/ApolloContext.js +7 -2
  86. package/react/context/ApolloContext.js.map +1 -1
  87. package/react/context/ApolloProvider.js +1 -1
  88. package/react/context/context.cjs +9 -4
  89. package/react/context/context.cjs.map +1 -1
  90. package/react/context/context.cjs.native.js +9 -4
  91. package/react/hoc/graphql.js +17 -4
  92. package/react/hoc/graphql.js.map +1 -1
  93. package/react/hoc/hoc-utils.js +1 -1
  94. package/react/hoc/hoc.cjs +55 -9
  95. package/react/hoc/hoc.cjs.map +1 -1
  96. package/react/hoc/hoc.cjs.native.js +55 -9
  97. package/react/hoc/mutation-hoc.js +8 -1
  98. package/react/hoc/mutation-hoc.js.map +1 -1
  99. package/react/hoc/query-hoc.js +8 -1
  100. package/react/hoc/query-hoc.js.map +1 -1
  101. package/react/hoc/subscription-hoc.js +8 -1
  102. package/react/hoc/subscription-hoc.js.map +1 -1
  103. package/react/hoc/withApollo.js +1 -1
  104. package/react/hooks/hooks.cjs +264 -31
  105. package/react/hooks/hooks.cjs.map +1 -1
  106. package/react/hooks/hooks.cjs.native.js +264 -31
  107. package/react/hooks/internal/index.d.ts +2 -0
  108. package/react/hooks/internal/index.js +2 -0
  109. package/react/hooks/internal/index.js.map +1 -1
  110. package/react/hooks/internal/useWarnRemoved.d.ts +2 -0
  111. package/react/hooks/internal/useWarnRemoved.js +14 -0
  112. package/react/hooks/internal/useWarnRemoved.js.map +1 -0
  113. package/react/hooks/internal/useWarnRemovedOption.d.ts +2 -0
  114. package/react/hooks/internal/useWarnRemovedOption.js +14 -0
  115. package/react/hooks/internal/useWarnRemovedOption.js.map +1 -0
  116. package/react/hooks/useApolloClient.js +1 -1
  117. package/react/hooks/useBackgroundQuery.js +11 -3
  118. package/react/hooks/useBackgroundQuery.js.map +1 -1
  119. package/react/hooks/useFragment.js +30 -21
  120. package/react/hooks/useFragment.js.map +1 -1
  121. package/react/hooks/useLazyQuery.js +65 -0
  122. package/react/hooks/useLazyQuery.js.map +1 -1
  123. package/react/hooks/useLoadableQuery.js +12 -5
  124. package/react/hooks/useLoadableQuery.js.map +1 -1
  125. package/react/hooks/useMutation.js +5 -1
  126. package/react/hooks/useMutation.js.map +1 -1
  127. package/react/hooks/useQuery.d.ts +2 -2
  128. package/react/hooks/useQuery.js +25 -7
  129. package/react/hooks/useQuery.js.map +1 -1
  130. package/react/hooks/useSubscription.js +3 -3
  131. package/react/hooks/useSubscription.js.map +1 -1
  132. package/react/hooks/useSuspenseQuery.js +12 -6
  133. package/react/hooks/useSuspenseQuery.js.map +1 -1
  134. package/react/hooks/useSyncExternalStore.js +1 -1
  135. package/react/internal/cache/QueryReference.d.ts +16 -0
  136. package/react/internal/cache/QueryReference.js +1 -1
  137. package/react/internal/cache/QueryReference.js.map +1 -1
  138. package/react/internal/internal.cjs +2 -2
  139. package/react/internal/internal.cjs.map +1 -1
  140. package/react/internal/internal.cjs.native.js +2 -2
  141. package/react/parser/index.d.ts +7 -0
  142. package/react/parser/index.js +17 -7
  143. package/react/parser/index.js.map +1 -1
  144. package/react/parser/parser.cjs +28 -7
  145. package/react/parser/parser.cjs.map +1 -1
  146. package/react/parser/parser.cjs.native.js +28 -7
  147. package/react/query-preloader/createQueryPreloader.d.ts +2 -1
  148. package/react/query-preloader/createQueryPreloader.js +14 -5
  149. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  150. package/react/react.cjs +40 -6
  151. package/react/react.cjs.map +1 -1
  152. package/react/react.cjs.native.js +40 -6
  153. package/react/types/types.d.ts +303 -9
  154. package/react/types/types.documentation.d.ts +2 -3
  155. package/react/types/types.documentation.js.map +1 -1
  156. package/react/types/types.js.map +1 -1
  157. package/testing/core/core.cjs +2 -2
  158. package/testing/core/core.cjs.map +1 -1
  159. package/testing/core/core.cjs.native.js +2 -2
  160. package/testing/core/mocking/mockLink.js +2 -2
  161. package/testing/react/MockedProvider.d.ts +27 -1
  162. package/testing/react/MockedProvider.js +16 -10
  163. package/testing/react/MockedProvider.js.map +1 -1
  164. package/testing/testing.cjs +42 -11
  165. package/testing/testing.cjs.map +1 -1
  166. package/testing/testing.cjs.native.js +42 -11
  167. package/utilities/deprecation/index.d.ts +11 -0
  168. package/utilities/deprecation/index.js +28 -0
  169. package/utilities/deprecation/index.js.map +1 -0
  170. package/utilities/globals/globals.cjs +1 -1
  171. package/utilities/globals/globals.cjs.map +1 -1
  172. package/utilities/globals/globals.cjs.native.js +1 -1
  173. package/utilities/graphql/DocumentTransform.js +1 -1
  174. package/utilities/graphql/directives.js +7 -7
  175. package/utilities/graphql/fragments.js +3 -3
  176. package/utilities/graphql/getFromAST.js +8 -8
  177. package/utilities/graphql/storeUtils.js +1 -1
  178. package/utilities/graphql/transform.js +2 -2
  179. package/utilities/utilities.cjs +22 -22
  180. package/utilities/utilities.cjs.map +1 -1
  181. package/utilities/utilities.cjs.native.js +22 -22
  182. package/version.js +1 -1
@@ -54,7 +54,7 @@ export const errorCodes = // This file is used by the error message display webs
54
54
  "For more information, please visit: https://go.apollo.dev/c/docs"
55
55
  },
56
56
 
57
- 17: {
57
+ 18: {
58
58
  file: "@apollo/client/core/ApolloClient.js",
59
59
  condition: "options.fetchPolicy !== \"cache-and-network\"",
60
60
 
@@ -64,48 +64,48 @@ export const errorCodes = // This file is used by the error message display webs
64
64
  "using a different fetchPolicy, such as cache-first or network-only."
65
65
  },
66
66
 
67
- 19: {
67
+ 20: {
68
68
  file: "@apollo/client/core/LocalState.js",
69
69
  condition: "fragment",
70
70
  message: "No fragment named %s"
71
71
  },
72
72
 
73
- 20: {
73
+ 21: {
74
74
  file: "@apollo/client/core/LocalState.js",
75
75
  condition: "fragment",
76
76
  message: "No fragment named %s"
77
77
  },
78
78
 
79
- 22: {
79
+ 23: {
80
80
  file: "@apollo/client/core/ObservableQuery.js",
81
81
  condition: "updateQuery",
82
82
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
83
83
  },
84
84
 
85
- 24: {
85
+ 25: {
86
86
  file: "@apollo/client/core/ObservableQuery.js",
87
87
  condition: "pollInterval",
88
88
  message: "Attempted to start a polling query without a polling interval."
89
89
  },
90
90
 
91
- 27: {
91
+ 28: {
92
92
  file: "@apollo/client/core/QueryManager.js",
93
93
  message: "QueryManager stopped while query was in flight"
94
94
  },
95
95
 
96
- 28: {
96
+ 29: {
97
97
  file: "@apollo/client/core/QueryManager.js",
98
98
  condition: "mutation",
99
99
  message: "mutation option is required. You must specify your GraphQL document in the mutation option."
100
100
  },
101
101
 
102
- 29: {
102
+ 30: {
103
103
  file: "@apollo/client/core/QueryManager.js",
104
104
  condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
105
105
  message: "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."
106
106
  },
107
107
 
108
- 30: {
108
+ 31: {
109
109
  file: "@apollo/client/core/QueryManager.js",
110
110
  condition: "options.query",
111
111
 
@@ -113,45 +113,45 @@ export const errorCodes = // This file is used by the error message display webs
113
113
  "in the query option."
114
114
  },
115
115
 
116
- 31: {
116
+ 32: {
117
117
  file: "@apollo/client/core/QueryManager.js",
118
118
  condition: "options.query.kind === \"Document\"",
119
119
  message: 'You must wrap the query string in a "gql" tag.'
120
120
  },
121
121
 
122
- 32: {
122
+ 33: {
123
123
  file: "@apollo/client/core/QueryManager.js",
124
124
  condition: "!options.returnPartialData",
125
125
  message: "returnPartialData option only supported on watchQuery."
126
126
  },
127
127
 
128
- 33: {
128
+ 34: {
129
129
  file: "@apollo/client/core/QueryManager.js",
130
130
  condition: "!options.pollInterval",
131
131
  message: "pollInterval option only supported on watchQuery."
132
132
  },
133
133
 
134
- 34: {
134
+ 35: {
135
135
  file: "@apollo/client/core/QueryManager.js",
136
136
  message: "Store reset while query was in flight (not completed in link chain)"
137
137
  },
138
138
 
139
- 39: {
139
+ 40: {
140
140
  file: "@apollo/client/link/core/ApolloLink.js",
141
141
  message: "request is not implemented"
142
142
  },
143
143
 
144
- 40: {
144
+ 41: {
145
145
  file: "@apollo/client/link/http/checkFetcher.js",
146
146
  message: "\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "
147
147
  },
148
148
 
149
- 42: {
149
+ 43: {
150
150
  file: "@apollo/client/link/http/serializeFetchParameter.js",
151
151
  message: "Network request failed. %s is not serializable: %s"
152
152
  },
153
153
 
154
- 43: {
154
+ 44: {
155
155
  file: "@apollo/client/link/persisted-queries/index.js",
156
156
  condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
157
157
 
@@ -160,42 +160,42 @@ export const errorCodes = // This file is used by the error message display webs
160
160
  "parameter."
161
161
  },
162
162
 
163
- 44: {
163
+ 45: {
164
164
  file: "@apollo/client/link/persisted-queries/index.js",
165
165
  condition: "forward",
166
166
  message: "PersistedQueryLink cannot be the last link in the chain."
167
167
  },
168
168
 
169
- 46: {
169
+ 47: {
170
170
  file: "@apollo/client/link/utils/validateOperation.js",
171
171
  message: "illegal argument: %s"
172
172
  },
173
173
 
174
- 47: {
174
+ 48: {
175
175
  file: "@apollo/client/masking/maskDefinition.js",
176
176
  condition: "fragment",
177
177
  message: "Could not find fragment with name '%s'."
178
178
  },
179
179
 
180
- 49: {
180
+ 50: {
181
181
  file: "@apollo/client/masking/maskFragment.js",
182
182
  condition: "fragments.length === 1",
183
183
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
184
184
  },
185
185
 
186
- 50: {
186
+ 51: {
187
187
  file: "@apollo/client/masking/maskFragment.js",
188
188
  condition: "!!fragment",
189
189
  message: "Could not find fragment with name \"%s\"."
190
190
  },
191
191
 
192
- 51: {
192
+ 52: {
193
193
  file: "@apollo/client/masking/maskOperation.js",
194
194
  condition: "definition",
195
195
  message: "Expected a parsed GraphQL document with a query, mutation, or subscription."
196
196
  },
197
197
 
198
- 53: {
198
+ 57: {
199
199
  file: "@apollo/client/react/context/ApolloConsumer.js",
200
200
  condition: "context && context.client",
201
201
 
@@ -203,7 +203,7 @@ export const errorCodes = // This file is used by the error message display webs
203
203
  "Wrap the root component in an <ApolloProvider>."
204
204
  },
205
205
 
206
- 54: {
206
+ 58: {
207
207
  file: "@apollo/client/react/context/ApolloContext.js",
208
208
  condition: "\"createContext\" in React",
209
209
 
@@ -214,7 +214,7 @@ export const errorCodes = // This file is used by the error message display webs
214
214
  "For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components"
215
215
  },
216
216
 
217
- 55: {
217
+ 60: {
218
218
  file: "@apollo/client/react/context/ApolloProvider.js",
219
219
  condition: "context.client",
220
220
 
@@ -222,7 +222,7 @@ export const errorCodes = // This file is used by the error message display webs
222
222
  'sure you pass in your client via the "client" prop.'
223
223
  },
224
224
 
225
- 56: {
225
+ 62: {
226
226
  file: "@apollo/client/react/hoc/hoc-utils.js",
227
227
  condition: "this.withRef",
228
228
 
@@ -230,7 +230,7 @@ export const errorCodes = // This file is used by the error message display webs
230
230
  "{ withRef: true } in the options"
231
231
  },
232
232
 
233
- 57: {
233
+ 66: {
234
234
  file: "@apollo/client/react/hoc/withApollo.js",
235
235
  condition: "operationOptions.withRef",
236
236
 
@@ -238,7 +238,7 @@ export const errorCodes = // This file is used by the error message display webs
238
238
  "{ withRef: true } in the options"
239
239
  },
240
240
 
241
- 58: {
241
+ 68: {
242
242
  file: "@apollo/client/react/hooks/useApolloClient.js",
243
243
  condition: "!!client",
244
244
 
@@ -247,37 +247,37 @@ export const errorCodes = // This file is used by the error message display webs
247
247
  "instance in via options."
248
248
  },
249
249
 
250
- 59: {
250
+ 71: {
251
251
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
252
252
  condition: "!calledDuringRender()",
253
253
  message: "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook."
254
254
  },
255
255
 
256
- 60: {
256
+ 72: {
257
257
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
258
258
  condition: "internalQueryRef",
259
259
  message: "The query has not been loaded. Please load the query."
260
260
  },
261
261
 
262
- 65: {
262
+ 78: {
263
263
  file: "@apollo/client/react/hooks/useSubscription.js",
264
264
  condition: "!optionsRef.current.skip",
265
265
  message: "A subscription that is skipped cannot be restarted."
266
266
  },
267
267
 
268
- 66: {
268
+ 79: {
269
269
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
270
270
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
271
271
  message: "The fetch policy `%s` is not supported with suspense."
272
272
  },
273
273
 
274
- 69: {
274
+ 82: {
275
275
  file: "@apollo/client/react/internal/cache/QueryReference.js",
276
276
  condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",
277
277
  message: "Expected a QueryRef object, but got something else instead."
278
278
  },
279
279
 
280
- 70: {
280
+ 84: {
281
281
  file: "@apollo/client/react/parser/index.js",
282
282
  condition: "!!document && !!document.kind",
283
283
 
@@ -286,7 +286,7 @@ export const errorCodes = // This file is used by the error message display webs
286
286
  "to convert your operation into a document"
287
287
  },
288
288
 
289
- 71: {
289
+ 85: {
290
290
  file: "@apollo/client/react/parser/index.js",
291
291
  condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
292
292
 
@@ -294,7 +294,7 @@ export const errorCodes = // This file is used by the error message display webs
294
294
  "You must include a query, subscription or mutation as well"
295
295
  },
296
296
 
297
- 72: {
297
+ 86: {
298
298
  file: "@apollo/client/react/parser/index.js",
299
299
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
300
300
 
@@ -304,7 +304,7 @@ export const errorCodes = // This file is used by the error message display webs
304
304
  "You can use 'compose' to join multiple operation types to a component"
305
305
  },
306
306
 
307
- 73: {
307
+ 87: {
308
308
  file: "@apollo/client/react/parser/index.js",
309
309
  condition: "definitions.length === 1",
310
310
 
@@ -313,120 +313,120 @@ export const errorCodes = // This file is used by the error message display webs
313
313
  "You can use 'compose' to join multiple operation types to a component"
314
314
  },
315
315
 
316
- 74: {
316
+ 88: {
317
317
  file: "@apollo/client/react/parser/index.js",
318
318
  condition: "operation.type === type",
319
319
  message: "Running a %s requires a graphql " + "%s, but a %s was used instead."
320
320
  },
321
321
 
322
- 75: {
322
+ 89: {
323
323
  file: "@apollo/client/testing/core/mocking/mockLink.js",
324
324
  condition: "queryWithoutClientOnlyDirectives",
325
325
  message: "query is required"
326
326
  },
327
327
 
328
- 76: {
328
+ 90: {
329
329
  file: "@apollo/client/testing/core/mocking/mockLink.js",
330
330
  condition: "mockedResponse.maxUsageCount > 0",
331
331
  message: "Mock response maxUsageCount must be greater than 0, %s given"
332
332
  },
333
333
 
334
- 77: {
334
+ 92: {
335
335
  file: "@apollo/client/utilities/graphql/DocumentTransform.js",
336
336
  condition: "Array.isArray(cacheKeys)",
337
337
  message: "`getCacheKey` must return an array or undefined"
338
338
  },
339
339
 
340
- 78: {
340
+ 93: {
341
341
  file: "@apollo/client/utilities/graphql/directives.js",
342
342
  condition: "evaledValue !== void 0",
343
343
  message: "Invalid variable referenced in @%s directive."
344
344
  },
345
345
 
346
- 79: {
346
+ 94: {
347
347
  file: "@apollo/client/utilities/graphql/directives.js",
348
348
  condition: "directiveArguments && directiveArguments.length === 1",
349
349
  message: "Incorrect number of arguments for the @%s directive."
350
350
  },
351
351
 
352
- 80: {
352
+ 95: {
353
353
  file: "@apollo/client/utilities/graphql/directives.js",
354
354
  condition: "ifArgument.name && ifArgument.name.value === \"if\"",
355
355
  message: "Invalid argument for the @%s directive."
356
356
  },
357
357
 
358
- 81: {
358
+ 96: {
359
359
  file: "@apollo/client/utilities/graphql/directives.js",
360
360
  condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",
361
361
  message: "Argument for the @%s directive must be a variable or a boolean value."
362
362
  },
363
363
 
364
- 85: {
364
+ 100: {
365
365
  file: "@apollo/client/utilities/graphql/fragments.js",
366
366
 
367
367
  message: "Found a %s operation%s. " +
368
368
  "No operations are allowed when using a fragment as a query. Only fragments are allowed."
369
369
  },
370
370
 
371
- 86: {
371
+ 101: {
372
372
  file: "@apollo/client/utilities/graphql/fragments.js",
373
373
  condition: "fragments.length === 1",
374
374
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
375
375
  },
376
376
 
377
- 87: {
377
+ 102: {
378
378
  file: "@apollo/client/utilities/graphql/fragments.js",
379
379
  condition: "fragment",
380
380
  message: "No fragment named %s"
381
381
  },
382
382
 
383
- 88: {
383
+ 103: {
384
384
  file: "@apollo/client/utilities/graphql/getFromAST.js",
385
385
  condition: "doc && doc.kind === \"Document\"",
386
386
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
387
387
  },
388
388
 
389
- 89: {
389
+ 104: {
390
390
  file: "@apollo/client/utilities/graphql/getFromAST.js",
391
391
  message: "Schema type definitions not allowed in queries. Found: \"%s\""
392
392
  },
393
393
 
394
- 90: {
394
+ 105: {
395
395
  file: "@apollo/client/utilities/graphql/getFromAST.js",
396
396
  condition: "operations.length <= 1",
397
397
  message: "Ambiguous GraphQL document: contains %s operations"
398
398
  },
399
399
 
400
- 91: {
400
+ 106: {
401
401
  file: "@apollo/client/utilities/graphql/getFromAST.js",
402
402
  condition: "queryDef && queryDef.operation === \"query\"",
403
403
  message: "Must contain a query definition."
404
404
  },
405
405
 
406
- 92: {
406
+ 107: {
407
407
  file: "@apollo/client/utilities/graphql/getFromAST.js",
408
408
  condition: "doc.kind === \"Document\"",
409
409
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
410
410
  },
411
411
 
412
- 93: {
412
+ 108: {
413
413
  file: "@apollo/client/utilities/graphql/getFromAST.js",
414
414
  condition: "doc.definitions.length <= 1",
415
415
  message: "Fragment must have exactly one definition."
416
416
  },
417
417
 
418
- 94: {
418
+ 109: {
419
419
  file: "@apollo/client/utilities/graphql/getFromAST.js",
420
420
  condition: "fragmentDef.kind === \"FragmentDefinition\"",
421
421
  message: "Must be a fragment definition."
422
422
  },
423
423
 
424
- 95: {
424
+ 110: {
425
425
  file: "@apollo/client/utilities/graphql/getFromAST.js",
426
426
  message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
427
427
  },
428
428
 
429
- 96: {
429
+ 111: {
430
430
  file: "@apollo/client/utilities/graphql/storeUtils.js",
431
431
 
432
432
  message: "The inline argument \"%s\" of kind \"%s\"" +
@@ -436,12 +436,12 @@ export const errorCodes = // This file is used by the error message display webs
436
436
  };
437
437
 
438
438
  export const devDebug = {
439
- 18: {
439
+ 19: {
440
440
  file: "@apollo/client/core/ApolloClient.js",
441
441
  message: "In client.refetchQueries, Promise.all promise rejected with error %o"
442
442
  },
443
443
 
444
- 26: {
444
+ 27: {
445
445
  file: "@apollo/client/core/ObservableQuery.js",
446
446
  message: "Missing cache result fields: %o"
447
447
  }
@@ -485,92 +485,167 @@ export const devWarn = {
485
485
  message: "Cache data may be lost when replacing the %s field of a %s object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\n\n existing: %o\n incoming: %o\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"
486
486
  },
487
487
 
488
- 21: {
488
+ 17: {
489
+ file: "@apollo/client/core/ApolloClient.js",
490
+ message: "[ApolloClient]: Apollo Client 4.0 will require a `link` option and will not create a default link when not provided. Please provide a `link` option."
491
+ },
492
+
493
+ 22: {
489
494
  file: "@apollo/client/core/ObservableQuery.js",
490
495
  message: "Called refetch(%o) for query %o, which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"
491
496
  },
492
497
 
493
- 35: {
498
+ 36: {
494
499
  file: "@apollo/client/core/QueryManager.js",
495
500
  message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
496
501
  },
497
502
 
498
- 36: {
503
+ 37: {
499
504
  file: "@apollo/client/core/QueryManager.js",
500
505
  message: "Unknown anonymous query requested in refetchQueries options.include array"
501
506
  },
502
507
 
503
- 37: {
508
+ 38: {
504
509
  file: "@apollo/client/core/QueryManager.js",
505
510
  message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy "no-cache". Please add `@unmask` to each fragment spread to access the data.'
506
511
  },
507
512
 
508
- 38: {
513
+ 39: {
509
514
  file: "@apollo/client/link/core/ApolloLink.js",
510
515
  message: "You are calling concat on a terminating link, which will have no effect %o"
511
516
  },
512
517
 
513
- 41: {
518
+ 42: {
514
519
  file: "@apollo/client/link/http/createHttpLink.js",
515
520
  message: "Multipart-subscriptions do not support @defer"
516
521
  },
517
522
 
518
- 45: {
523
+ 46: {
519
524
  file: "@apollo/client/link/utils/toPromise.js",
520
525
  message: "Promise Wrapper does not support multiple results from Observable"
521
526
  },
522
527
 
523
- 48: {
528
+ 49: {
524
529
  file: "@apollo/client/masking/maskDefinition.js",
525
530
  message: "Accessing unmasked field on %s at path '%s'. This field will not be available when masking is enabled. Please read the field from the fragment instead."
526
531
  },
527
532
 
528
- 52: {
533
+ 53: {
529
534
  file: "@apollo/client/masking/utils.js",
530
535
  message: "The configured cache does not support data masking which effectively disables it. Please use a cache that supports data masking or disable data masking to silence this warning."
531
536
  },
532
537
 
538
+ 54: {
539
+ file: "@apollo/client/react/components/Mutation.js",
540
+ message: "[Mutation]: The `<Mutation />` component is deprecated and will be removed in Apollo Client 4.0. Please use the `useMutation` React hook instead."
541
+ },
542
+
543
+ 55: {
544
+ file: "@apollo/client/react/components/Query.js",
545
+ message: "[Query]: The `<Query />` component is deprecated and will be removed in Apollo Client 4.0. Please use an available React hook such as `useQuery` instead."
546
+ },
547
+
548
+ 56: {
549
+ file: "@apollo/client/react/components/Subscription.js",
550
+ message: "[Subscription]: The `<Subscription />` component is deprecated and will be removed in Apollo Client 4.0. Please use the `useSubscription` React hook instead."
551
+ },
552
+
553
+ 59: {
554
+ file: "@apollo/client/react/context/ApolloContext.js",
555
+ message: "[resetApolloContext]: `resetApolloContext` is deprecated and will be removed in Apollo Client 4.0. Please use `getApolloContext` instead."
556
+ },
557
+
533
558
  61: {
559
+ file: "@apollo/client/react/hoc/graphql.js",
560
+ message: "[graphql]: The `graphql` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`, `useMutation`, or `useSubscription`."
561
+ },
562
+
563
+ 63: {
564
+ file: "@apollo/client/react/hoc/mutation-hoc.js",
565
+ message: "[withMutation]: The `withMutation` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`."
566
+ },
567
+
568
+ 64: {
569
+ file: "@apollo/client/react/hoc/query-hoc.js",
570
+ message: "[withQuery]: The `withQuery` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`."
571
+ },
572
+
573
+ 65: {
574
+ file: "@apollo/client/react/hoc/subscription-hoc.js",
575
+ message: "[withSubscription]: The `withSubscription` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useSubscription`."
576
+ },
577
+
578
+ 67: {
579
+ file: "@apollo/client/react/hooks/internal/useWarnRemovedOption.js",
580
+ message: "[%s]: `%s` is a deprecated hook option and will be removed in Apollo Client 4.0. %s"
581
+ },
582
+
583
+ 69: {
584
+ file: "@apollo/client/react/hooks/useLazyQuery.js",
585
+ message: "[useLazyQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useLazyQuery` with new options."
586
+ },
587
+
588
+ 70: {
589
+ file: "@apollo/client/react/hooks/useLazyQuery.js",
590
+ message: "[useLazyQuery]: Calling `execute` in render will throw in Apollo Client 4.0. Either switch to `useQuery` to run the query during render or move the `execute` call inside of `useEffect`."
591
+ },
592
+
593
+ 73: {
594
+ file: "@apollo/client/react/hooks/useQuery.js",
595
+ message: "[useQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useQuery` with new options."
596
+ },
597
+
598
+ 74: {
534
599
  file: "@apollo/client/react/hooks/useSubscription.js",
535
600
  message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
536
601
  },
537
602
 
538
- 62: {
603
+ 75: {
539
604
  file: "@apollo/client/react/hooks/useSubscription.js",
540
- message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
605
+ message: "[useSubscription]: `onSubscriptionData` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onData' option instead."
541
606
  },
542
607
 
543
- 63: {
608
+ 76: {
544
609
  file: "@apollo/client/react/hooks/useSubscription.js",
545
610
  message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
546
611
  },
547
612
 
548
- 64: {
613
+ 77: {
549
614
  file: "@apollo/client/react/hooks/useSubscription.js",
550
- message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
615
+ message: "[useSubscription]: `onSubscriptionComplete` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onComplete' option instead."
551
616
  },
552
617
 
553
- 67: {
618
+ 80: {
554
619
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
555
620
  message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."
556
621
  },
557
622
 
558
- 82: {
623
+ 83: {
624
+ file: "@apollo/client/react/parser/index.js",
625
+ message: "[parser]: `parser` is deprecated and will be removed in Apollo Client 4.0. Please remove all usages of `parser`."
626
+ },
627
+
628
+ 91: {
629
+ file: "@apollo/client/utilities/deprecation/index.js",
630
+ message: "[%s]: `%s` is deprecated and will be removed in Apollo Client 4.0. %s"
631
+ },
632
+
633
+ 97: {
559
634
  file: "@apollo/client/utilities/graphql/directives.js",
560
635
  message: "@unmask 'mode' argument does not support variables."
561
636
  },
562
637
 
563
- 83: {
638
+ 98: {
564
639
  file: "@apollo/client/utilities/graphql/directives.js",
565
640
  message: "@unmask 'mode' argument must be of type string."
566
641
  },
567
642
 
568
- 84: {
643
+ 99: {
569
644
  file: "@apollo/client/utilities/graphql/directives.js",
570
645
  message: "@unmask 'mode' argument does not recognize value '%s'."
571
646
  },
572
647
 
573
- 98: {
648
+ 113: {
574
649
  file: "@apollo/client/utilities/graphql/transform.js",
575
650
 
576
651
  message: "Removing an @connection directive even though it does not have a key. " +
@@ -584,22 +659,22 @@ export const devError = {
584
659
  message: "Missing field '%s' while writing result %o"
585
660
  },
586
661
 
587
- 23: {
662
+ 24: {
588
663
  file: "@apollo/client/core/ObservableQuery.js",
589
664
  message: "Unhandled GraphQL subscription error"
590
665
  },
591
666
 
592
- 25: {
667
+ 26: {
593
668
  file: "@apollo/client/core/ObservableQuery.js",
594
669
  message: "Unhandled error"
595
670
  },
596
671
 
597
- 68: {
672
+ 81: {
598
673
  file: "@apollo/client/react/hooks/useSyncExternalStore.js",
599
674
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
600
675
  },
601
676
 
602
- 97: {
677
+ 112: {
603
678
  file: "@apollo/client/utilities/graphql/transform.js",
604
679
  message: "Could not find operation or fragment"
605
680
  }
@@ -49,7 +49,7 @@ var ApolloLink = /** @class */ (function () {
49
49
  ApolloLink.concat = function (first, second) {
50
50
  var firstLink = toLink(first);
51
51
  if (isTerminating(firstLink)) {
52
- globalThis.__DEV__ !== false && invariant.warn(38, firstLink);
52
+ globalThis.__DEV__ !== false && invariant.warn(39, firstLink);
53
53
  return firstLink;
54
54
  }
55
55
  var nextLink = toLink(second);
@@ -75,7 +75,7 @@ var ApolloLink = /** @class */ (function () {
75
75
  return ApolloLink.concat(this, next);
76
76
  };
77
77
  ApolloLink.prototype.request = function (operation, forward) {
78
- throw newInvariantError(39);
78
+ throw newInvariantError(40);
79
79
  };
80
80
  ApolloLink.prototype.onError = function (error, observer) {
81
81
  if (observer && observer.error) {