@apollo/client 3.8.0-beta.5 → 3.8.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (646) hide show
  1. package/apollo-client.cjs +282 -242
  2. package/apollo-client.cjs.map +1 -1
  3. package/apollo-client.min.cjs +1 -1
  4. package/cache/cache.cjs +12 -12
  5. package/cache/cache.cjs.map +1 -1
  6. package/cache/cache.cjs.native.js +12 -12
  7. package/cache/core/cache.d.ts +3 -3
  8. package/cache/core/cache.d.ts.map +1 -1
  9. package/cache/core/cache.js +1 -1
  10. package/cache/core/cache.js.map +1 -1
  11. package/cache/core/types/Cache.d.ts +3 -3
  12. package/cache/core/types/Cache.d.ts.map +1 -1
  13. package/cache/core/types/Cache.js.map +1 -1
  14. package/cache/core/types/DataProxy.d.ts +2 -2
  15. package/cache/core/types/DataProxy.d.ts.map +1 -1
  16. package/cache/core/types/DataProxy.js.map +1 -1
  17. package/cache/core/types/common.d.ts +2 -2
  18. package/cache/core/types/common.d.ts.map +1 -1
  19. package/cache/core/types/common.js.map +1 -1
  20. package/cache/index.d.ts +14 -14
  21. package/cache/index.d.ts.map +1 -1
  22. package/cache/index.js +13 -13
  23. package/cache/index.js.map +1 -1
  24. package/cache/inmemory/entityStore.d.ts +5 -5
  25. package/cache/inmemory/entityStore.d.ts.map +1 -1
  26. package/cache/inmemory/entityStore.js +3 -3
  27. package/cache/inmemory/entityStore.js.map +1 -1
  28. package/cache/inmemory/fragmentRegistry.js.map +1 -1
  29. package/cache/inmemory/helpers.d.ts +5 -5
  30. package/cache/inmemory/helpers.d.ts.map +1 -1
  31. package/cache/inmemory/helpers.js +1 -1
  32. package/cache/inmemory/helpers.js.map +1 -1
  33. package/cache/inmemory/inMemoryCache.d.ts +8 -8
  34. package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
  35. package/cache/inmemory/inMemoryCache.js +13 -13
  36. package/cache/inmemory/inMemoryCache.js.map +1 -1
  37. package/cache/inmemory/key-extractor.d.ts +1 -1
  38. package/cache/inmemory/key-extractor.d.ts.map +1 -1
  39. package/cache/inmemory/key-extractor.js.map +1 -1
  40. package/cache/inmemory/object-canon.d.ts.map +1 -1
  41. package/cache/inmemory/object-canon.js +2 -3
  42. package/cache/inmemory/object-canon.js.map +1 -1
  43. package/cache/inmemory/policies.d.ts +6 -6
  44. package/cache/inmemory/policies.d.ts.map +1 -1
  45. package/cache/inmemory/policies.js +9 -9
  46. package/cache/inmemory/policies.js.map +1 -1
  47. package/cache/inmemory/reactiveVars.d.ts +1 -1
  48. package/cache/inmemory/reactiveVars.d.ts.map +1 -1
  49. package/cache/inmemory/reactiveVars.js.map +1 -1
  50. package/cache/inmemory/readFromStore.d.ts +6 -6
  51. package/cache/inmemory/readFromStore.d.ts.map +1 -1
  52. package/cache/inmemory/readFromStore.js +7 -7
  53. package/cache/inmemory/readFromStore.js.map +1 -1
  54. package/cache/inmemory/types.d.ts +6 -6
  55. package/cache/inmemory/types.d.ts.map +1 -1
  56. package/cache/inmemory/types.js.map +1 -1
  57. package/cache/inmemory/writeToStore.d.ts +6 -6
  58. package/cache/inmemory/writeToStore.d.ts.map +1 -1
  59. package/cache/inmemory/writeToStore.js +10 -10
  60. package/cache/inmemory/writeToStore.js.map +1 -1
  61. package/config/jest/setup.d.ts +1 -1
  62. package/config/jest/setup.d.ts.map +1 -1
  63. package/config/jest/setup.js +2 -2
  64. package/config/jest/setup.js.map +1 -1
  65. package/core/ApolloClient.d.ts +10 -10
  66. package/core/ApolloClient.d.ts.map +1 -1
  67. package/core/ApolloClient.js +12 -11
  68. package/core/ApolloClient.js.map +1 -1
  69. package/core/LocalState.d.ts +5 -5
  70. package/core/LocalState.d.ts.map +1 -1
  71. package/core/LocalState.js +5 -5
  72. package/core/LocalState.js.map +1 -1
  73. package/core/ObservableQuery.d.ts +11 -10
  74. package/core/ObservableQuery.d.ts.map +1 -1
  75. package/core/ObservableQuery.js +17 -13
  76. package/core/ObservableQuery.js.map +1 -1
  77. package/core/QueryInfo.d.ts +9 -9
  78. package/core/QueryInfo.d.ts.map +1 -1
  79. package/core/QueryInfo.js +4 -4
  80. package/core/QueryInfo.js.map +1 -1
  81. package/core/QueryManager.d.ts +12 -12
  82. package/core/QueryManager.d.ts.map +1 -1
  83. package/core/QueryManager.js +25 -25
  84. package/core/QueryManager.js.map +1 -1
  85. package/core/core.cjs +43 -37
  86. package/core/core.cjs.map +1 -1
  87. package/core/core.cjs.native.js +43 -37
  88. package/core/equalByQuery.d.ts +2 -2
  89. package/core/equalByQuery.d.ts.map +1 -1
  90. package/core/equalByQuery.js +9 -8
  91. package/core/equalByQuery.js.map +1 -1
  92. package/core/index.d.ts +13 -13
  93. package/core/index.d.ts.map +1 -1
  94. package/core/index.js +12 -13
  95. package/core/index.js.map +1 -1
  96. package/core/types.d.ts +10 -10
  97. package/core/types.d.ts.map +1 -1
  98. package/core/types.js.map +1 -1
  99. package/core/watchQueryOptions.d.ts +4 -4
  100. package/core/watchQueryOptions.d.ts.map +1 -1
  101. package/core/watchQueryOptions.js.map +1 -1
  102. package/dev/dev.cjs +73 -81
  103. package/dev/dev.cjs.map +1 -1
  104. package/dev/dev.cjs.native.js +73 -81
  105. package/dev/index.d.ts +3 -3
  106. package/dev/index.d.ts.map +1 -1
  107. package/dev/index.js +3 -3
  108. package/dev/index.js.map +1 -1
  109. package/dev/loadDevMessages.js +2 -2
  110. package/dev/loadDevMessages.js.map +1 -1
  111. package/dev/loadErrorMessageHandler.d.ts +1 -1
  112. package/dev/loadErrorMessageHandler.d.ts.map +1 -1
  113. package/dev/loadErrorMessageHandler.js +2 -2
  114. package/dev/loadErrorMessageHandler.js.map +1 -1
  115. package/dev/loadErrorMessages.js +2 -2
  116. package/dev/loadErrorMessages.js.map +1 -1
  117. package/errors/errors.cjs.map +1 -1
  118. package/errors/index.d.ts +4 -4
  119. package/errors/index.d.ts.map +1 -1
  120. package/errors/index.js +2 -2
  121. package/errors/index.js.map +1 -1
  122. package/index.d.ts +2 -2
  123. package/index.d.ts.map +1 -1
  124. package/index.js +2 -2
  125. package/index.js.map +1 -1
  126. package/invariantErrorCodes.js +71 -78
  127. package/link/batch/batch.cjs.map +1 -1
  128. package/link/batch/batchLink.d.ts +5 -5
  129. package/link/batch/batchLink.d.ts.map +1 -1
  130. package/link/batch/batchLink.js +3 -3
  131. package/link/batch/batchLink.js.map +1 -1
  132. package/link/batch/batching.d.ts +2 -2
  133. package/link/batch/batching.d.ts.map +1 -1
  134. package/link/batch/batching.js +1 -1
  135. package/link/batch/batching.js.map +1 -1
  136. package/link/batch/index.d.ts +1 -1
  137. package/link/batch/index.d.ts.map +1 -1
  138. package/link/batch/index.js +1 -1
  139. package/link/batch/index.js.map +1 -1
  140. package/link/batch-http/batch-http.cjs.map +1 -1
  141. package/link/batch-http/batchHttpLink.d.ts +5 -5
  142. package/link/batch-http/batchHttpLink.d.ts.map +1 -1
  143. package/link/batch-http/batchHttpLink.js +5 -5
  144. package/link/batch-http/batchHttpLink.js.map +1 -1
  145. package/link/batch-http/index.d.ts +1 -1
  146. package/link/batch-http/index.d.ts.map +1 -1
  147. package/link/batch-http/index.js +1 -1
  148. package/link/batch-http/index.js.map +1 -1
  149. package/link/context/context.cjs.map +1 -1
  150. package/link/context/index.d.ts +3 -3
  151. package/link/context/index.d.ts.map +1 -1
  152. package/link/context/index.js +2 -2
  153. package/link/context/index.js.map +1 -1
  154. package/link/core/ApolloLink.d.ts +3 -3
  155. package/link/core/ApolloLink.d.ts.map +1 -1
  156. package/link/core/ApolloLink.js +5 -5
  157. package/link/core/ApolloLink.js.map +1 -1
  158. package/link/core/concat.d.ts +1 -1
  159. package/link/core/concat.d.ts.map +1 -1
  160. package/link/core/concat.js +1 -1
  161. package/link/core/concat.js.map +1 -1
  162. package/link/core/core.cjs +2 -2
  163. package/link/core/core.cjs.map +1 -1
  164. package/link/core/core.cjs.native.js +2 -2
  165. package/link/core/empty.d.ts +1 -1
  166. package/link/core/empty.d.ts.map +1 -1
  167. package/link/core/empty.js +1 -1
  168. package/link/core/empty.js.map +1 -1
  169. package/link/core/execute.d.ts +1 -1
  170. package/link/core/execute.d.ts.map +1 -1
  171. package/link/core/execute.js +1 -1
  172. package/link/core/execute.js.map +1 -1
  173. package/link/core/from.d.ts +1 -1
  174. package/link/core/from.d.ts.map +1 -1
  175. package/link/core/from.js +1 -1
  176. package/link/core/from.js.map +1 -1
  177. package/link/core/index.d.ts +8 -8
  178. package/link/core/index.d.ts.map +1 -1
  179. package/link/core/index.js +8 -8
  180. package/link/core/index.js.map +1 -1
  181. package/link/core/split.d.ts +1 -1
  182. package/link/core/split.d.ts.map +1 -1
  183. package/link/core/split.js +1 -1
  184. package/link/core/split.js.map +1 -1
  185. package/link/core/types.d.ts +2 -2
  186. package/link/core/types.d.ts.map +1 -1
  187. package/link/core/types.js.map +1 -1
  188. package/link/error/error.cjs.map +1 -1
  189. package/link/error/index.d.ts +4 -4
  190. package/link/error/index.d.ts.map +1 -1
  191. package/link/error/index.js +2 -2
  192. package/link/error/index.js.map +1 -1
  193. package/link/http/HttpLink.d.ts +3 -3
  194. package/link/http/HttpLink.d.ts.map +1 -1
  195. package/link/http/HttpLink.js +2 -2
  196. package/link/http/HttpLink.js.map +1 -1
  197. package/link/http/checkFetcher.js +2 -2
  198. package/link/http/checkFetcher.js.map +1 -1
  199. package/link/http/createHttpLink.d.ts +2 -2
  200. package/link/http/createHttpLink.d.ts.map +1 -1
  201. package/link/http/createHttpLink.js +14 -14
  202. package/link/http/createHttpLink.js.map +1 -1
  203. package/link/http/http.cjs +4 -4
  204. package/link/http/http.cjs.map +1 -1
  205. package/link/http/http.cjs.native.js +4 -4
  206. package/link/http/index.d.ts +10 -10
  207. package/link/http/index.d.ts.map +1 -1
  208. package/link/http/index.js +10 -10
  209. package/link/http/index.js.map +1 -1
  210. package/link/http/iterators/nodeStream.js.map +1 -1
  211. package/link/http/iterators/promise.js.map +1 -1
  212. package/link/http/iterators/reader.js.map +1 -1
  213. package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
  214. package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
  215. package/link/http/parseAndCheckHttpResponse.js +2 -2
  216. package/link/http/parseAndCheckHttpResponse.js.map +1 -1
  217. package/link/http/responseIterator.js.map +1 -1
  218. package/link/http/rewriteURIForGET.d.ts +1 -1
  219. package/link/http/rewriteURIForGET.d.ts.map +1 -1
  220. package/link/http/rewriteURIForGET.js +1 -1
  221. package/link/http/rewriteURIForGET.js.map +1 -1
  222. package/link/http/selectHttpOptionsAndBody.d.ts +2 -2
  223. package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
  224. package/link/http/selectHttpOptionsAndBody.js +1 -1
  225. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  226. package/link/http/selectURI.d.ts +1 -1
  227. package/link/http/selectURI.d.ts.map +1 -1
  228. package/link/http/selectURI.js.map +1 -1
  229. package/link/http/serializeFetchParameter.d.ts +1 -1
  230. package/link/http/serializeFetchParameter.d.ts.map +1 -1
  231. package/link/http/serializeFetchParameter.js +2 -2
  232. package/link/http/serializeFetchParameter.js.map +1 -1
  233. package/link/persisted-queries/index.d.ts +3 -3
  234. package/link/persisted-queries/index.d.ts.map +1 -1
  235. package/link/persisted-queries/index.js +6 -6
  236. package/link/persisted-queries/index.js.map +1 -1
  237. package/link/persisted-queries/persisted-queries.cjs +2 -2
  238. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  239. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  240. package/link/remove-typename/index.d.ts +1 -1
  241. package/link/remove-typename/index.d.ts.map +1 -1
  242. package/link/remove-typename/index.js +1 -1
  243. package/link/remove-typename/index.js.map +1 -1
  244. package/link/remove-typename/remove-typename.cjs.map +1 -1
  245. package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
  246. package/link/remove-typename/removeTypenameFromVariables.d.ts.map +1 -1
  247. package/link/remove-typename/removeTypenameFromVariables.js +2 -2
  248. package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
  249. package/link/retry/delayFunction.d.ts +1 -1
  250. package/link/retry/delayFunction.d.ts.map +1 -1
  251. package/link/retry/delayFunction.js.map +1 -1
  252. package/link/retry/index.d.ts +1 -1
  253. package/link/retry/index.d.ts.map +1 -1
  254. package/link/retry/index.js +1 -1
  255. package/link/retry/index.js.map +1 -1
  256. package/link/retry/retry.cjs.map +1 -1
  257. package/link/retry/retryFunction.d.ts +1 -1
  258. package/link/retry/retryFunction.d.ts.map +1 -1
  259. package/link/retry/retryFunction.js.map +1 -1
  260. package/link/retry/retryLink.d.ts +5 -5
  261. package/link/retry/retryLink.d.ts.map +1 -1
  262. package/link/retry/retryLink.js +4 -4
  263. package/link/retry/retryLink.js.map +1 -1
  264. package/link/schema/index.d.ts +3 -3
  265. package/link/schema/index.d.ts.map +1 -1
  266. package/link/schema/index.js +2 -2
  267. package/link/schema/index.js.map +1 -1
  268. package/link/schema/schema.cjs.map +1 -1
  269. package/link/subscriptions/index.d.ts +3 -3
  270. package/link/subscriptions/index.d.ts.map +1 -1
  271. package/link/subscriptions/index.js +1 -1
  272. package/link/subscriptions/index.js.map +1 -1
  273. package/link/subscriptions/subscriptions.cjs.map +1 -1
  274. package/link/utils/createOperation.d.ts +1 -1
  275. package/link/utils/createOperation.d.ts.map +1 -1
  276. package/link/utils/createOperation.js.map +1 -1
  277. package/link/utils/fromError.d.ts +1 -1
  278. package/link/utils/fromError.d.ts.map +1 -1
  279. package/link/utils/fromError.js +1 -1
  280. package/link/utils/fromError.js.map +1 -1
  281. package/link/utils/fromPromise.d.ts +1 -1
  282. package/link/utils/fromPromise.d.ts.map +1 -1
  283. package/link/utils/fromPromise.js +1 -1
  284. package/link/utils/fromPromise.js.map +1 -1
  285. package/link/utils/index.d.ts +9 -9
  286. package/link/utils/index.d.ts.map +1 -1
  287. package/link/utils/index.js +9 -9
  288. package/link/utils/index.js.map +1 -1
  289. package/link/utils/toPromise.d.ts +1 -1
  290. package/link/utils/toPromise.d.ts.map +1 -1
  291. package/link/utils/toPromise.js +2 -2
  292. package/link/utils/toPromise.js.map +1 -1
  293. package/link/utils/transformOperation.d.ts +1 -1
  294. package/link/utils/transformOperation.d.ts.map +1 -1
  295. package/link/utils/transformOperation.js +1 -1
  296. package/link/utils/transformOperation.js.map +1 -1
  297. package/link/utils/utils.cjs +2 -2
  298. package/link/utils/utils.cjs.map +1 -1
  299. package/link/utils/utils.cjs.native.js +2 -2
  300. package/link/utils/validateOperation.d.ts +1 -1
  301. package/link/utils/validateOperation.d.ts.map +1 -1
  302. package/link/utils/validateOperation.js +2 -2
  303. package/link/utils/validateOperation.js.map +1 -1
  304. package/link/ws/index.d.ts +3 -3
  305. package/link/ws/index.d.ts.map +1 -1
  306. package/link/ws/index.js +1 -1
  307. package/link/ws/index.js.map +1 -1
  308. package/link/ws/ws.cjs.map +1 -1
  309. package/package.json +18 -14
  310. package/react/cache/QueryReference.d.ts +9 -6
  311. package/react/cache/QueryReference.d.ts.map +1 -1
  312. package/react/cache/QueryReference.js +108 -52
  313. package/react/cache/QueryReference.js.map +1 -1
  314. package/react/cache/SuspenseCache.d.ts +3 -3
  315. package/react/cache/SuspenseCache.d.ts.map +1 -1
  316. package/react/cache/SuspenseCache.js +2 -2
  317. package/react/cache/SuspenseCache.js.map +1 -1
  318. package/react/cache/index.d.ts +1 -1
  319. package/react/cache/index.d.ts.map +1 -1
  320. package/react/cache/index.js +1 -1
  321. package/react/cache/index.js.map +1 -1
  322. package/react/components/Mutation.d.ts +3 -3
  323. package/react/components/Mutation.d.ts.map +1 -1
  324. package/react/components/Mutation.js +1 -1
  325. package/react/components/Mutation.js.map +1 -1
  326. package/react/components/Query.d.ts +2 -2
  327. package/react/components/Query.d.ts.map +1 -1
  328. package/react/components/Query.js +1 -1
  329. package/react/components/Query.js.map +1 -1
  330. package/react/components/Subscription.d.ts +2 -2
  331. package/react/components/Subscription.d.ts.map +1 -1
  332. package/react/components/Subscription.js +1 -1
  333. package/react/components/Subscription.js.map +1 -1
  334. package/react/components/components.cjs.map +1 -1
  335. package/react/components/index.d.ts +4 -4
  336. package/react/components/index.d.ts.map +1 -1
  337. package/react/components/index.js +4 -4
  338. package/react/components/index.js.map +1 -1
  339. package/react/components/types.d.ts +2 -2
  340. package/react/components/types.d.ts.map +1 -1
  341. package/react/components/types.js.map +1 -1
  342. package/react/context/ApolloConsumer.d.ts +1 -1
  343. package/react/context/ApolloConsumer.d.ts.map +1 -1
  344. package/react/context/ApolloConsumer.js +3 -3
  345. package/react/context/ApolloConsumer.js.map +1 -1
  346. package/react/context/ApolloContext.d.ts +4 -5
  347. package/react/context/ApolloContext.d.ts.map +1 -1
  348. package/react/context/ApolloContext.js +12 -5
  349. package/react/context/ApolloContext.js.map +1 -1
  350. package/react/context/ApolloProvider.d.ts +2 -2
  351. package/react/context/ApolloProvider.d.ts.map +1 -1
  352. package/react/context/ApolloProvider.js +3 -3
  353. package/react/context/ApolloProvider.js.map +1 -1
  354. package/react/context/context.cjs +12 -5
  355. package/react/context/context.cjs.map +1 -1
  356. package/react/context/context.cjs.native.js +12 -5
  357. package/react/context/index.d.ts +4 -4
  358. package/react/context/index.d.ts.map +1 -1
  359. package/react/context/index.js +4 -4
  360. package/react/context/index.js.map +1 -1
  361. package/react/hoc/graphql.d.ts +2 -2
  362. package/react/hoc/graphql.d.ts.map +1 -1
  363. package/react/hoc/graphql.js +4 -4
  364. package/react/hoc/graphql.js.map +1 -1
  365. package/react/hoc/hoc-utils.d.ts +2 -2
  366. package/react/hoc/hoc-utils.d.ts.map +1 -1
  367. package/react/hoc/hoc-utils.js +2 -2
  368. package/react/hoc/hoc-utils.js.map +1 -1
  369. package/react/hoc/hoc.cjs +2 -2
  370. package/react/hoc/hoc.cjs.map +1 -1
  371. package/react/hoc/hoc.cjs.native.js +2 -2
  372. package/react/hoc/index.d.ts +7 -7
  373. package/react/hoc/index.d.ts.map +1 -1
  374. package/react/hoc/index.js +7 -7
  375. package/react/hoc/index.js.map +1 -1
  376. package/react/hoc/mutation-hoc.d.ts +3 -3
  377. package/react/hoc/mutation-hoc.d.ts.map +1 -1
  378. package/react/hoc/mutation-hoc.js +3 -3
  379. package/react/hoc/mutation-hoc.js.map +1 -1
  380. package/react/hoc/query-hoc.d.ts +1 -1
  381. package/react/hoc/query-hoc.d.ts.map +1 -1
  382. package/react/hoc/query-hoc.js +3 -3
  383. package/react/hoc/query-hoc.js.map +1 -1
  384. package/react/hoc/subscription-hoc.d.ts +1 -1
  385. package/react/hoc/subscription-hoc.d.ts.map +1 -1
  386. package/react/hoc/subscription-hoc.js +3 -3
  387. package/react/hoc/subscription-hoc.js.map +1 -1
  388. package/react/hoc/types.d.ts +4 -4
  389. package/react/hoc/types.d.ts.map +1 -1
  390. package/react/hoc/types.js.map +1 -1
  391. package/react/hoc/withApollo.d.ts +1 -1
  392. package/react/hoc/withApollo.d.ts.map +1 -1
  393. package/react/hoc/withApollo.js +3 -3
  394. package/react/hoc/withApollo.js.map +1 -1
  395. package/react/hooks/hooks.cjs +179 -140
  396. package/react/hooks/hooks.cjs.map +1 -1
  397. package/react/hooks/hooks.cjs.native.js +179 -140
  398. package/react/hooks/index.d.ts +11 -11
  399. package/react/hooks/index.d.ts.map +1 -1
  400. package/react/hooks/index.js +11 -11
  401. package/react/hooks/index.js.map +1 -1
  402. package/react/hooks/internal/__use.js +2 -2
  403. package/react/hooks/internal/__use.js.map +1 -1
  404. package/react/hooks/internal/index.d.ts +3 -4
  405. package/react/hooks/internal/index.d.ts.map +1 -1
  406. package/react/hooks/internal/index.js +3 -4
  407. package/react/hooks/internal/index.js.map +1 -1
  408. package/react/hooks/internal/useDeepMemo.js +2 -2
  409. package/react/hooks/internal/useDeepMemo.js.map +1 -1
  410. package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +2 -2
  411. package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -1
  412. package/react/hooks/internal/useIsomorphicLayoutEffect.js +4 -4
  413. package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
  414. package/react/hooks/useApolloClient.d.ts +1 -1
  415. package/react/hooks/useApolloClient.d.ts.map +1 -1
  416. package/react/hooks/useApolloClient.js +5 -5
  417. package/react/hooks/useApolloClient.js.map +1 -1
  418. package/react/hooks/useBackgroundQuery.d.ts +5 -5
  419. package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
  420. package/react/hooks/useBackgroundQuery.js +16 -17
  421. package/react/hooks/useBackgroundQuery.js.map +1 -1
  422. package/react/hooks/useFragment.d.ts +4 -4
  423. package/react/hooks/useFragment.d.ts.map +1 -1
  424. package/react/hooks/useFragment.js +2 -2
  425. package/react/hooks/useFragment.js.map +1 -1
  426. package/react/hooks/useLazyQuery.d.ts +2 -2
  427. package/react/hooks/useLazyQuery.d.ts.map +1 -1
  428. package/react/hooks/useLazyQuery.js +9 -9
  429. package/react/hooks/useLazyQuery.js.map +1 -1
  430. package/react/hooks/useMutation.d.ts +2 -2
  431. package/react/hooks/useMutation.d.ts.map +1 -1
  432. package/react/hooks/useMutation.js +10 -10
  433. package/react/hooks/useMutation.js.map +1 -1
  434. package/react/hooks/useQuery.d.ts +4 -4
  435. package/react/hooks/useQuery.d.ts.map +1 -1
  436. package/react/hooks/useQuery.js +17 -17
  437. package/react/hooks/useQuery.js.map +1 -1
  438. package/react/hooks/useReactiveVar.d.ts +1 -1
  439. package/react/hooks/useReactiveVar.d.ts.map +1 -1
  440. package/react/hooks/useReactiveVar.js +3 -3
  441. package/react/hooks/useReactiveVar.js.map +1 -1
  442. package/react/hooks/useReadQuery.d.ts +3 -3
  443. package/react/hooks/useReadQuery.d.ts.map +1 -1
  444. package/react/hooks/useReadQuery.js +6 -6
  445. package/react/hooks/useReadQuery.js.map +1 -1
  446. package/react/hooks/useSubscription.d.ts +2 -2
  447. package/react/hooks/useSubscription.d.ts.map +1 -1
  448. package/react/hooks/useSubscription.js +14 -14
  449. package/react/hooks/useSubscription.js.map +1 -1
  450. package/react/hooks/useSuspenseCache.d.ts +1 -1
  451. package/react/hooks/useSuspenseCache.d.ts.map +1 -1
  452. package/react/hooks/useSuspenseCache.js +5 -5
  453. package/react/hooks/useSuspenseCache.js.map +1 -1
  454. package/react/hooks/useSuspenseQuery.d.ts +4 -6
  455. package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
  456. package/react/hooks/useSuspenseQuery.js +30 -34
  457. package/react/hooks/useSuspenseQuery.js.map +1 -1
  458. package/react/hooks/useSyncExternalStore.js +4 -4
  459. package/react/hooks/useSyncExternalStore.js.map +1 -1
  460. package/react/index.d.ts +6 -6
  461. package/react/index.d.ts.map +1 -1
  462. package/react/index.js +6 -6
  463. package/react/index.js.map +1 -1
  464. package/react/parser/index.js +6 -6
  465. package/react/parser/index.js.map +1 -1
  466. package/react/parser/parser.cjs +5 -5
  467. package/react/parser/parser.cjs.map +1 -1
  468. package/react/parser/parser.cjs.native.js +5 -5
  469. package/react/react.cjs +106 -50
  470. package/react/react.cjs.map +1 -1
  471. package/react/react.cjs.native.js +106 -50
  472. package/react/ssr/RenderPromises.d.ts +2 -2
  473. package/react/ssr/RenderPromises.d.ts.map +1 -1
  474. package/react/ssr/RenderPromises.js.map +1 -1
  475. package/react/ssr/getDataFromTree.js +2 -2
  476. package/react/ssr/getDataFromTree.js.map +1 -1
  477. package/react/ssr/index.d.ts +3 -3
  478. package/react/ssr/index.d.ts.map +1 -1
  479. package/react/ssr/index.js +3 -3
  480. package/react/ssr/index.js.map +1 -1
  481. package/react/ssr/renderToStringWithData.js +1 -1
  482. package/react/ssr/renderToStringWithData.js.map +1 -1
  483. package/react/ssr/ssr.cjs.map +1 -1
  484. package/react/types/types.d.ts +7 -7
  485. package/react/types/types.d.ts.map +1 -1
  486. package/react/types/types.js.map +1 -1
  487. package/testing/core/core.cjs +1 -1
  488. package/testing/core/core.cjs.map +1 -1
  489. package/testing/core/core.cjs.native.js +1 -1
  490. package/testing/core/index.d.ts +7 -7
  491. package/testing/core/index.d.ts.map +1 -1
  492. package/testing/core/index.js +7 -7
  493. package/testing/core/index.js.map +1 -1
  494. package/testing/core/mocking/mockClient.d.ts +2 -2
  495. package/testing/core/mocking/mockClient.d.ts.map +1 -1
  496. package/testing/core/mocking/mockClient.js +3 -3
  497. package/testing/core/mocking/mockClient.js.map +1 -1
  498. package/testing/core/mocking/mockLink.d.ts +3 -3
  499. package/testing/core/mocking/mockLink.d.ts.map +1 -1
  500. package/testing/core/mocking/mockLink.js +4 -4
  501. package/testing/core/mocking/mockLink.js.map +1 -1
  502. package/testing/core/mocking/mockQueryManager.d.ts +3 -3
  503. package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
  504. package/testing/core/mocking/mockQueryManager.js +3 -3
  505. package/testing/core/mocking/mockQueryManager.js.map +1 -1
  506. package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
  507. package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
  508. package/testing/core/mocking/mockSubscriptionLink.js +2 -2
  509. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
  510. package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
  511. package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
  512. package/testing/core/mocking/mockWatchQuery.js +1 -1
  513. package/testing/core/mocking/mockWatchQuery.js.map +1 -1
  514. package/testing/core/observableToPromise.d.ts +2 -2
  515. package/testing/core/observableToPromise.d.ts.map +1 -1
  516. package/testing/core/observableToPromise.js.map +1 -1
  517. package/testing/core/subscribeAndCount.d.ts +1 -1
  518. package/testing/core/subscribeAndCount.d.ts.map +1 -1
  519. package/testing/core/subscribeAndCount.js +1 -1
  520. package/testing/core/subscribeAndCount.js.map +1 -1
  521. package/testing/index.d.ts +3 -3
  522. package/testing/index.d.ts.map +1 -1
  523. package/testing/index.js +3 -3
  524. package/testing/index.js.map +1 -1
  525. package/testing/matchers/index.js +2 -2
  526. package/testing/matchers/index.js.map +1 -1
  527. package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +1 -1
  528. package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts.map +1 -1
  529. package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +2 -2
  530. package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
  531. package/testing/matchers/toMatchDocument.d.ts +1 -1
  532. package/testing/matchers/toMatchDocument.d.ts.map +1 -1
  533. package/testing/matchers/toMatchDocument.js +1 -1
  534. package/testing/matchers/toMatchDocument.js.map +1 -1
  535. package/testing/react/MockedProvider.d.ts +7 -7
  536. package/testing/react/MockedProvider.d.ts.map +1 -1
  537. package/testing/react/MockedProvider.js +5 -5
  538. package/testing/react/MockedProvider.js.map +1 -1
  539. package/testing/testing.cjs.map +1 -1
  540. package/utilities/common/canUse.js.map +1 -1
  541. package/utilities/common/compact.d.ts +1 -1
  542. package/utilities/common/compact.d.ts.map +1 -1
  543. package/utilities/common/compact.js.map +1 -1
  544. package/utilities/common/errorHandling.d.ts +1 -1
  545. package/utilities/common/errorHandling.d.ts.map +1 -1
  546. package/utilities/common/errorHandling.js.map +1 -1
  547. package/utilities/common/incrementalResult.d.ts +1 -1
  548. package/utilities/common/incrementalResult.d.ts.map +1 -1
  549. package/utilities/common/incrementalResult.js.map +1 -1
  550. package/utilities/common/maybeDeepFreeze.d.ts.map +1 -1
  551. package/utilities/common/maybeDeepFreeze.js +3 -4
  552. package/utilities/common/maybeDeepFreeze.js.map +1 -1
  553. package/utilities/common/mergeDeep.d.ts +1 -1
  554. package/utilities/common/mergeDeep.d.ts.map +1 -1
  555. package/utilities/common/mergeDeep.js.map +1 -1
  556. package/utilities/common/mergeOptions.d.ts +1 -1
  557. package/utilities/common/mergeOptions.d.ts.map +1 -1
  558. package/utilities/common/mergeOptions.js.map +1 -1
  559. package/utilities/common/omitDeep.d.ts +1 -1
  560. package/utilities/common/omitDeep.d.ts.map +1 -1
  561. package/utilities/common/omitDeep.js +1 -1
  562. package/utilities/common/omitDeep.js.map +1 -1
  563. package/utilities/common/responseIterator.js.map +1 -1
  564. package/utilities/common/stringifyForDisplay.js.map +1 -1
  565. package/utilities/common/stripTypename.d.ts +1 -1
  566. package/utilities/common/stripTypename.d.ts.map +1 -1
  567. package/utilities/common/stripTypename.js +1 -1
  568. package/utilities/common/stripTypename.js.map +1 -1
  569. package/utilities/globals/global.d.ts.map +1 -1
  570. package/utilities/globals/global.js.map +1 -1
  571. package/utilities/globals/globals.cjs +4 -16
  572. package/utilities/globals/globals.cjs.map +1 -1
  573. package/utilities/globals/globals.cjs.native.js +4 -16
  574. package/utilities/globals/index.d.ts +5 -6
  575. package/utilities/globals/index.d.ts.map +1 -1
  576. package/utilities/globals/index.js +2 -5
  577. package/utilities/globals/index.js.map +1 -1
  578. package/utilities/globals/invariantWrappers.d.ts +1 -1
  579. package/utilities/globals/invariantWrappers.d.ts.map +1 -1
  580. package/utilities/globals/invariantWrappers.js +3 -3
  581. package/utilities/globals/invariantWrappers.js.map +1 -1
  582. package/utilities/graphql/DocumentTransform.js +4 -4
  583. package/utilities/graphql/DocumentTransform.js.map +1 -1
  584. package/utilities/graphql/directives.js +5 -5
  585. package/utilities/graphql/directives.js.map +1 -1
  586. package/utilities/graphql/fragments.js +4 -4
  587. package/utilities/graphql/fragments.js.map +1 -1
  588. package/utilities/graphql/getFromAST.js +10 -10
  589. package/utilities/graphql/getFromAST.js.map +1 -1
  590. package/utilities/graphql/operations.d.ts +1 -1
  591. package/utilities/graphql/operations.d.ts.map +1 -1
  592. package/utilities/graphql/operations.js +1 -1
  593. package/utilities/graphql/operations.js.map +1 -1
  594. package/utilities/graphql/print.js +1 -1
  595. package/utilities/graphql/print.js.map +1 -1
  596. package/utilities/graphql/storeUtils.d.ts +1 -1
  597. package/utilities/graphql/storeUtils.d.ts.map +1 -1
  598. package/utilities/graphql/storeUtils.js +4 -4
  599. package/utilities/graphql/storeUtils.js.map +1 -1
  600. package/utilities/graphql/transform.js +7 -7
  601. package/utilities/graphql/transform.js.map +1 -1
  602. package/utilities/index.d.ts +34 -34
  603. package/utilities/index.d.ts.map +1 -1
  604. package/utilities/index.js +32 -32
  605. package/utilities/index.js.map +1 -1
  606. package/utilities/observables/Concast.d.ts +2 -2
  607. package/utilities/observables/Concast.d.ts.map +1 -1
  608. package/utilities/observables/Concast.js.map +1 -1
  609. package/utilities/observables/asyncMap.d.ts +1 -1
  610. package/utilities/observables/asyncMap.d.ts.map +1 -1
  611. package/utilities/observables/asyncMap.js.map +1 -1
  612. package/utilities/observables/iteration.d.ts +1 -1
  613. package/utilities/observables/iteration.d.ts.map +1 -1
  614. package/utilities/observables/iteration.js.map +1 -1
  615. package/utilities/observables/subclassing.d.ts +1 -1
  616. package/utilities/observables/subclassing.d.ts.map +1 -1
  617. package/utilities/observables/subclassing.js.map +1 -1
  618. package/utilities/policies/pagination.d.ts +1 -1
  619. package/utilities/policies/pagination.d.ts.map +1 -1
  620. package/utilities/policies/pagination.js +1 -1
  621. package/utilities/policies/pagination.js.map +1 -1
  622. package/utilities/promises/decoration.d.ts.map +1 -1
  623. package/utilities/promises/decoration.js +1 -0
  624. package/utilities/promises/decoration.js.map +1 -1
  625. package/utilities/types/DeepOmit.d.ts +1 -1
  626. package/utilities/types/DeepOmit.d.ts.map +1 -1
  627. package/utilities/types/DeepOmit.js.map +1 -1
  628. package/utilities/types/DeepPartial.d.ts +1 -1
  629. package/utilities/types/DeepPartial.d.ts.map +1 -1
  630. package/utilities/types/DeepPartial.js.map +1 -1
  631. package/utilities/utilities.cjs +22 -21
  632. package/utilities/utilities.cjs.map +1 -1
  633. package/utilities/utilities.cjs.native.js +22 -21
  634. package/version.js +1 -1
  635. package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts +0 -2
  636. package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts.map +0 -1
  637. package/react/hooks/internal/useStrictModeSafeCleanupEffect.js +0 -11
  638. package/react/hooks/internal/useStrictModeSafeCleanupEffect.js.map +0 -1
  639. package/utilities/globals/DEV.d.ts +0 -3
  640. package/utilities/globals/DEV.d.ts.map +0 -1
  641. package/utilities/globals/DEV.js +0 -4
  642. package/utilities/globals/DEV.js.map +0 -1
  643. package/utilities/globals/fix-graphql.d.ts +0 -2
  644. package/utilities/globals/fix-graphql.d.ts.map +0 -1
  645. package/utilities/globals/fix-graphql.js +0 -6
  646. package/utilities/globals/fix-graphql.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"watchQueryOptions.js","sourceRoot":"","sources":["../../src/core/watchQueryOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { TypedDocumentNode } from '@graphql-typed-document-node/core';\n\nimport type { FetchResult } from '../link/core';\nimport type {\n DefaultContext,\n MutationQueryReducersMap,\n OperationVariables,\n MutationUpdaterFunction,\n OnQueryUpdated,\n InternalRefetchQueriesInclude,\n} from './types';\nimport type { ApolloCache } from '../cache';\nimport type { ObservableQuery } from './ObservableQuery';\n\n/**\n * fetchPolicy determines where the client may return a result from. The options are:\n * - cache-first (default): return result from cache. Only fetch from network if cached result is not available.\n * - cache-and-network: return result from cache first (if it exists), then return network result once it's available.\n * - cache-only: return result from cache if available, fail otherwise.\n * - no-cache: return result from network, fail if network call doesn't succeed, don't save to cache\n * - network-only: return result from network, fail if network call doesn't succeed, save to cache\n * - standby: only for queries that aren't actively watched, but should be available for refetch and updateQueries.\n */\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby';\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network';\n\nexport type MutationFetchPolicy = Extract<\n FetchPolicy,\n | 'network-only' // default behavior (mutation results written to cache)\n | 'no-cache' // alternate behavior (results not written to cache)\n>;\n\nexport type RefetchWritePolicy = \"merge\" | \"overwrite\";\n\n/**\n * errorPolicy determines the level of events for errors in the execution result. The options are:\n * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n * - ignore: errors from the request do not stop the observable, but also don't call `next`\n * - all: errors are treated like data and will notify observables\n */\nexport type ErrorPolicy = 'none' | 'ignore' | 'all';\n\n/**\n * Query options.\n */\nexport interface QueryOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document that consists of a single query to be sent down to the\n * server.\n */\n // TODO REFACTOR: rename this to document. Didn't do it yet because it's in a\n // lot of tests.\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * A map going from variable name to variable value, where the variables are used\n * within the GraphQL query.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this query\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context to be passed to link execution chain\n */\n context?: DefaultContext;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this query\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * The time interval (in milliseconds) on which this query should be\n * refetched from the server.\n */\n pollInterval?: number;\n\n /**\n * Whether or not updates to the network status should trigger next on the observer of this query\n */\n notifyOnNetworkStatusChange?: boolean;\n\n /**\n * Allow returning incomplete data from the cache when a larger query cannot\n * be fully satisfied by the cache, instead of returning nothing.\n */\n returnPartialData?: boolean;\n\n /**\n * If `true`, perform a query `refetch` if the query result is marked as\n * being partial, and the returned data is reset to an empty Object by the\n * Apollo Client `QueryManager` (due to a cache miss).\n */\n partialRefetch?: boolean;\n\n /**\n * Whether to canonize cache results before returning them. Canonization\n * takes some extra time, but it speeds up future deep equality comparisons.\n * Defaults to false.\n */\n canonizeResults?: boolean;\n}\n\n/**\n * Watched query options.\n */\nexport interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any>\n extends Omit<QueryOptions<TVariables, TData>, 'fetchPolicy'> {\n /**\n * Specifies the {@link FetchPolicy} to be used for this query.\n */\n fetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies the {@link FetchPolicy} to be used after this query has completed.\n */\n nextFetchPolicy?: WatchQueryFetchPolicy | ((\n this: WatchQueryOptions<TVariables, TData>,\n currentFetchPolicy: WatchQueryFetchPolicy,\n context: NextFetchPolicyContext<TData, TVariables>,\n ) => WatchQueryFetchPolicy);\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n */\n initialFetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies whether a {@link NetworkStatus.refetch} operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n */\n refetchWritePolicy?: RefetchWritePolicy;\n}\n\nexport interface NextFetchPolicyContext<TData, TVariables extends OperationVariables> {\n reason:\n | \"after-fetch\"\n | \"variables-changed\";\n observable: ObservableQuery<TData, TVariables>;\n options: WatchQueryOptions<TVariables, TData>;\n initialFetchPolicy: WatchQueryFetchPolicy;\n}\n\nexport interface FetchMoreQueryOptions<TVariables, TData = any> {\n query?: DocumentNode | TypedDocumentNode<TData, TVariables>;\n variables?: Partial<TVariables>;\n context?: DefaultContext;\n}\n\nexport type UpdateQueryFn<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = (\n previousQueryResult: TData,\n options: {\n subscriptionData: { data: TSubscriptionData };\n variables?: TSubscriptionVariables;\n },\n) => TData;\n\nexport type SubscribeToMoreOptions<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = {\n document: DocumentNode | TypedDocumentNode<TSubscriptionData, TSubscriptionVariables>;\n variables?: TSubscriptionVariables;\n updateQuery?: UpdateQueryFn<TData, TSubscriptionVariables, TSubscriptionData>;\n onError?: (error: Error) => void;\n context?: DefaultContext;\n};\n\nexport interface SubscriptionOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * An object that maps from the name of a variable as used in the subscription\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this subscription.\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context object to be passed through the link execution chain.\n */\n context?: DefaultContext;\n}\n\nexport interface MutationBaseOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> {\n /**\n * An object that represents the result of this mutation that will be\n * optimistically stored before the server has actually returned a result.\n * This is most often used for optimistic UI, where we want to be able to see\n * the result of a mutation immediately, and update the UI later if any errors\n * appear.\n */\n optimisticResponse?: TData | ((vars: TVariables) => TData);\n\n /**\n * A {@link MutationQueryReducersMap}, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /**\n * A list of query names which will be refetched once this mutation has\n * returned. This is often used if you have a set of queries which may be\n * affected by a mutation and will have to update. Rather than writing a\n * mutation query reducer (i.e. `updateQueries`) for this, you can simply\n * refetch the queries that will be affected and achieve a consistent store\n * once these queries return.\n */\n refetchQueries?:\n | ((result: FetchResult<TData>) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /**\n * By default, `refetchQueries` does not wait for the refetched queries to\n * be completed, before resolving the mutation `Promise`. This ensures that\n * query refetching does not hold up mutation response handling (query\n * refetching is handled asynchronously). Set `awaitRefetchQueries` to\n * `true` if you would like to wait for the refetched queries to complete,\n * before the mutation can be marked as resolved.\n */\n awaitRefetchQueries?: boolean;\n\n /**\n * A function which provides an {@link ApolloCache} instance, and the result\n * of the mutation, to allow the user to update the store based on the\n * results of the mutation.\n *\n * This function will be called twice over the lifecycle of a mutation. Once\n * at the very beginning if an `optimisticResponse` was provided. The writes\n * created from the optimistic data will be rolled back before the second time\n * this function is called which is when the mutation has successfully\n * resolved. At that point `update` will be called with the *actual* mutation\n * result and those writes will not be rolled back.\n *\n * Note that since this function is intended to be used to update the\n * store, it cannot be used with a `no-cache` fetch policy. If you're\n * interested in performing some action after a mutation has completed,\n * and you don't need to update the store, use the Promise returned from\n * `client.mutate` instead.\n */\n update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;\n\n /**\n * A function that will be called for each ObservableQuery affected by\n * this mutation, after the mutation has completed.\n */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * An object that maps from the name of a variable as used in the mutation\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * The context to be passed to the link execution chain. This context will\n * only be used with this mutation. It will not be used with\n * `refetchQueries`. Refetched queries use the context they were\n * initialized with (since the initial context is stored as part of the\n * `ObservableQuery` instance). If a specific context is needed when\n * refetching queries, make sure it is configured (via the\n * [query `context` option](https://www.apollographql.com/docs/react/api/apollo-client#ApolloClient.query))\n * when the query is first initialized/run.\n */\n context?: TContext;\n}\n\nexport interface MutationOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n */\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * Specifies the {@link MutationFetchPolicy} to be used for this query.\n * Mutations support only 'network-only' and 'no-cache' fetchPolicy strings.\n * If fetchPolicy is not provided, it defaults to 'network-only'.\n */\n fetchPolicy?: MutationFetchPolicy;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields?: boolean;\n}\n"]}
1
+ {"version":3,"file":"watchQueryOptions.js","sourceRoot":"","sources":["../../src/core/watchQueryOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { TypedDocumentNode } from '@graphql-typed-document-node/core';\n\nimport type { FetchResult } from '../link/core/index.js';\nimport type {\n DefaultContext,\n MutationQueryReducersMap,\n OperationVariables,\n MutationUpdaterFunction,\n OnQueryUpdated,\n InternalRefetchQueriesInclude,\n} from './types.js';\nimport type { ApolloCache } from '../cache/index.js';\nimport type { ObservableQuery } from './ObservableQuery.js';\n\n/**\n * fetchPolicy determines where the client may return a result from. The options are:\n * - cache-first (default): return result from cache. Only fetch from network if cached result is not available.\n * - cache-and-network: return result from cache first (if it exists), then return network result once it's available.\n * - cache-only: return result from cache if available, fail otherwise.\n * - no-cache: return result from network, fail if network call doesn't succeed, don't save to cache\n * - network-only: return result from network, fail if network call doesn't succeed, save to cache\n * - standby: only for queries that aren't actively watched, but should be available for refetch and updateQueries.\n */\nexport type FetchPolicy =\n | 'cache-first'\n | 'network-only'\n | 'cache-only'\n | 'no-cache'\n | 'standby';\n\nexport type WatchQueryFetchPolicy = FetchPolicy | 'cache-and-network';\n\nexport type MutationFetchPolicy = Extract<\n FetchPolicy,\n | 'network-only' // default behavior (mutation results written to cache)\n | 'no-cache' // alternate behavior (results not written to cache)\n>;\n\nexport type RefetchWritePolicy = \"merge\" | \"overwrite\";\n\n/**\n * errorPolicy determines the level of events for errors in the execution result. The options are:\n * - none (default): any errors from the request are treated like runtime errors and the observable is stopped (XXX this is default to lower breaking changes going from AC 1.0 => 2.0)\n * - ignore: errors from the request do not stop the observable, but also don't call `next`\n * - all: errors are treated like data and will notify observables\n */\nexport type ErrorPolicy = 'none' | 'ignore' | 'all';\n\n/**\n * Query options.\n */\nexport interface QueryOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document that consists of a single query to be sent down to the\n * server.\n */\n // TODO REFACTOR: rename this to document. Didn't do it yet because it's in a\n // lot of tests.\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * A map going from variable name to variable value, where the variables are used\n * within the GraphQL query.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this query\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context to be passed to link execution chain\n */\n context?: DefaultContext;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this query\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * The time interval (in milliseconds) on which this query should be\n * refetched from the server.\n */\n pollInterval?: number;\n\n /**\n * Whether or not updates to the network status should trigger next on the observer of this query\n */\n notifyOnNetworkStatusChange?: boolean;\n\n /**\n * Allow returning incomplete data from the cache when a larger query cannot\n * be fully satisfied by the cache, instead of returning nothing.\n */\n returnPartialData?: boolean;\n\n /**\n * If `true`, perform a query `refetch` if the query result is marked as\n * being partial, and the returned data is reset to an empty Object by the\n * Apollo Client `QueryManager` (due to a cache miss).\n */\n partialRefetch?: boolean;\n\n /**\n * Whether to canonize cache results before returning them. Canonization\n * takes some extra time, but it speeds up future deep equality comparisons.\n * Defaults to false.\n */\n canonizeResults?: boolean;\n}\n\n/**\n * Watched query options.\n */\nexport interface WatchQueryOptions<TVariables extends OperationVariables = OperationVariables, TData = any>\n extends Omit<QueryOptions<TVariables, TData>, 'fetchPolicy'> {\n /**\n * Specifies the {@link FetchPolicy} to be used for this query.\n */\n fetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies the {@link FetchPolicy} to be used after this query has completed.\n */\n nextFetchPolicy?: WatchQueryFetchPolicy | ((\n this: WatchQueryOptions<TVariables, TData>,\n currentFetchPolicy: WatchQueryFetchPolicy,\n context: NextFetchPolicyContext<TData, TVariables>,\n ) => WatchQueryFetchPolicy);\n\n /**\n * Defaults to the initial value of options.fetchPolicy, but can be explicitly\n * configured to specify the WatchQueryFetchPolicy to revert back to whenever\n * variables change (unless nextFetchPolicy intervenes).\n */\n initialFetchPolicy?: WatchQueryFetchPolicy;\n\n /**\n * Specifies whether a {@link NetworkStatus.refetch} operation should merge\n * incoming field data with existing data, or overwrite the existing data.\n * Overwriting is probably preferable, but merging is currently the default\n * behavior, for backwards compatibility with Apollo Client 3.x.\n */\n refetchWritePolicy?: RefetchWritePolicy;\n}\n\nexport interface NextFetchPolicyContext<TData, TVariables extends OperationVariables> {\n reason:\n | \"after-fetch\"\n | \"variables-changed\";\n observable: ObservableQuery<TData, TVariables>;\n options: WatchQueryOptions<TVariables, TData>;\n initialFetchPolicy: WatchQueryFetchPolicy;\n}\n\nexport interface FetchMoreQueryOptions<TVariables, TData = any> {\n query?: DocumentNode | TypedDocumentNode<TData, TVariables>;\n variables?: Partial<TVariables>;\n context?: DefaultContext;\n}\n\nexport type UpdateQueryFn<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = (\n previousQueryResult: TData,\n options: {\n subscriptionData: { data: TSubscriptionData };\n variables?: TSubscriptionVariables;\n },\n) => TData;\n\nexport type SubscribeToMoreOptions<\n TData = any,\n TSubscriptionVariables = OperationVariables,\n TSubscriptionData = TData\n> = {\n document: DocumentNode | TypedDocumentNode<TSubscriptionData, TSubscriptionVariables>;\n variables?: TSubscriptionVariables;\n updateQuery?: UpdateQueryFn<TData, TSubscriptionVariables, TSubscriptionData>;\n onError?: (error: Error) => void;\n context?: DefaultContext;\n};\n\nexport interface SubscriptionOptions<TVariables = OperationVariables, TData = any> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single subscription inside of it.\n */\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * An object that maps from the name of a variable as used in the subscription\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * Specifies the {@link FetchPolicy} to be used for this subscription.\n */\n fetchPolicy?: FetchPolicy;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * Context object to be passed through the link execution chain.\n */\n context?: DefaultContext;\n}\n\nexport interface MutationBaseOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> {\n /**\n * An object that represents the result of this mutation that will be\n * optimistically stored before the server has actually returned a result.\n * This is most often used for optimistic UI, where we want to be able to see\n * the result of a mutation immediately, and update the UI later if any errors\n * appear.\n */\n optimisticResponse?: TData | ((vars: TVariables) => TData);\n\n /**\n * A {@link MutationQueryReducersMap}, which is map from query names to\n * mutation query reducers. Briefly, this map defines how to incorporate the\n * results of the mutation into the results of queries that are currently\n * being watched by your application.\n */\n updateQueries?: MutationQueryReducersMap<TData>;\n\n /**\n * A list of query names which will be refetched once this mutation has\n * returned. This is often used if you have a set of queries which may be\n * affected by a mutation and will have to update. Rather than writing a\n * mutation query reducer (i.e. `updateQueries`) for this, you can simply\n * refetch the queries that will be affected and achieve a consistent store\n * once these queries return.\n */\n refetchQueries?:\n | ((result: FetchResult<TData>) => InternalRefetchQueriesInclude)\n | InternalRefetchQueriesInclude;\n\n /**\n * By default, `refetchQueries` does not wait for the refetched queries to\n * be completed, before resolving the mutation `Promise`. This ensures that\n * query refetching does not hold up mutation response handling (query\n * refetching is handled asynchronously). Set `awaitRefetchQueries` to\n * `true` if you would like to wait for the refetched queries to complete,\n * before the mutation can be marked as resolved.\n */\n awaitRefetchQueries?: boolean;\n\n /**\n * A function which provides an {@link ApolloCache} instance, and the result\n * of the mutation, to allow the user to update the store based on the\n * results of the mutation.\n *\n * This function will be called twice over the lifecycle of a mutation. Once\n * at the very beginning if an `optimisticResponse` was provided. The writes\n * created from the optimistic data will be rolled back before the second time\n * this function is called which is when the mutation has successfully\n * resolved. At that point `update` will be called with the *actual* mutation\n * result and those writes will not be rolled back.\n *\n * Note that since this function is intended to be used to update the\n * store, it cannot be used with a `no-cache` fetch policy. If you're\n * interested in performing some action after a mutation has completed,\n * and you don't need to update the store, use the Promise returned from\n * `client.mutate` instead.\n */\n update?: MutationUpdaterFunction<TData, TVariables, TContext, TCache>;\n\n /**\n * A function that will be called for each ObservableQuery affected by\n * this mutation, after the mutation has completed.\n */\n onQueryUpdated?: OnQueryUpdated<any>;\n\n /**\n * Specifies the {@link ErrorPolicy} to be used for this operation\n */\n errorPolicy?: ErrorPolicy;\n\n /**\n * An object that maps from the name of a variable as used in the mutation\n * GraphQL document to that variable's value.\n */\n variables?: TVariables;\n\n /**\n * The context to be passed to the link execution chain. This context will\n * only be used with this mutation. It will not be used with\n * `refetchQueries`. Refetched queries use the context they were\n * initialized with (since the initial context is stored as part of the\n * `ObservableQuery` instance). If a specific context is needed when\n * refetching queries, make sure it is configured (via the\n * [query `context` option](https://www.apollographql.com/docs/react/api/apollo-client#ApolloClient.query))\n * when the query is first initialized/run.\n */\n context?: TContext;\n}\n\nexport interface MutationOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {\n /**\n * A GraphQL document, often created with `gql` from the `graphql-tag`\n * package, that contains a single mutation inside of it.\n */\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * Specifies the {@link MutationFetchPolicy} to be used for this query.\n * Mutations support only 'network-only' and 'no-cache' fetchPolicy strings.\n * If fetchPolicy is not provided, it defaults to 'network-only'.\n */\n fetchPolicy?: MutationFetchPolicy;\n\n /**\n * To avoid retaining sensitive information from mutation root field\n * arguments, Apollo Client v3.4+ automatically clears any `ROOT_MUTATION`\n * fields from the cache after each mutation finishes. If you need this\n * information to remain in the cache, you can prevent the removal by passing\n * `keepRootFields: true` to the mutation. `ROOT_MUTATION` result data are\n * also passed to the mutation `update` function, so we recommend obtaining\n * the results that way, rather than using this option, if possible.\n */\n keepRootFields?: boolean;\n}\n"]}
package/dev/dev.cjs CHANGED
@@ -62,7 +62,7 @@ const errorCodes = // This file is used by the error message display website and
62
62
  "For more information, please visit: https://go.apollo.dev/c/docs"
63
63
  },
64
64
 
65
- 15: {
65
+ 14: {
66
66
  file: "@apollo/client/core/ApolloClient.js",
67
67
  condition: "options.fetchPolicy !== 'cache-and-network'",
68
68
 
@@ -72,42 +72,42 @@ const errorCodes = // This file is used by the error message display website and
72
72
  'using a different fetchPolicy, such as cache-first or network-only.'
73
73
  },
74
74
 
75
- 17: {
75
+ 16: {
76
76
  file: "@apollo/client/core/LocalState.js",
77
77
  condition: "fragment",
78
78
  message: "No fragment named %s"
79
79
  },
80
80
 
81
- 18: {
81
+ 17: {
82
82
  file: "@apollo/client/core/LocalState.js",
83
83
  condition: "fragment",
84
84
  message: "No fragment named %s"
85
85
  },
86
86
 
87
- 21: {
87
+ 20: {
88
88
  file: "@apollo/client/core/ObservableQuery.js",
89
89
  condition: "pollInterval",
90
90
  message: 'Attempted to start a polling query without a polling interval.'
91
91
  },
92
92
 
93
- 24: {
93
+ 23: {
94
94
  file: "@apollo/client/core/QueryManager.js",
95
95
  message: 'QueryManager stopped while query was in flight'
96
96
  },
97
97
 
98
- 25: {
98
+ 24: {
99
99
  file: "@apollo/client/core/QueryManager.js",
100
100
  condition: "mutation",
101
101
  message: 'mutation option is required. You must specify your GraphQL document in the mutation option.'
102
102
  },
103
103
 
104
- 26: {
104
+ 25: {
105
105
  file: "@apollo/client/core/QueryManager.js",
106
106
  condition: "fetchPolicy === 'network-only' ||\n fetchPolicy === 'no-cache'",
107
107
  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."
108
108
  },
109
109
 
110
- 27: {
110
+ 26: {
111
111
  file: "@apollo/client/core/QueryManager.js",
112
112
  condition: "options.query",
113
113
 
@@ -115,45 +115,45 @@ const errorCodes = // This file is used by the error message display website and
115
115
  'in the query option.'
116
116
  },
117
117
 
118
- 28: {
118
+ 27: {
119
119
  file: "@apollo/client/core/QueryManager.js",
120
120
  condition: "options.query.kind === 'Document'",
121
121
  message: 'You must wrap the query string in a "gql" tag.'
122
122
  },
123
123
 
124
- 29: {
124
+ 28: {
125
125
  file: "@apollo/client/core/QueryManager.js",
126
126
  condition: "!options.returnPartialData",
127
127
  message: 'returnPartialData option only supported on watchQuery.'
128
128
  },
129
129
 
130
- 30: {
130
+ 29: {
131
131
  file: "@apollo/client/core/QueryManager.js",
132
132
  condition: "!options.pollInterval",
133
133
  message: 'pollInterval option only supported on watchQuery.'
134
134
  },
135
135
 
136
- 31: {
136
+ 30: {
137
137
  file: "@apollo/client/core/QueryManager.js",
138
138
  message: 'Store reset while query was in flight (not completed in link chain)'
139
139
  },
140
140
 
141
- 35: {
141
+ 34: {
142
142
  file: "@apollo/client/link/core/ApolloLink.js",
143
143
  message: 'request is not implemented'
144
144
  },
145
145
 
146
- 36: {
146
+ 35: {
147
147
  file: "@apollo/client/link/http/checkFetcher.js",
148
148
  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 "
149
149
  },
150
150
 
151
- 38: {
151
+ 37: {
152
152
  file: "@apollo/client/link/http/serializeFetchParameter.js",
153
153
  message: "Network request failed. %s is not serializable: %s"
154
154
  },
155
155
 
156
- 39: {
156
+ 38: {
157
157
  file: "@apollo/client/link/persisted-queries/index.js",
158
158
  condition: "options && (typeof options.sha256 === 'function' ||\n typeof options.generateHash === 'function')",
159
159
 
@@ -162,18 +162,18 @@ const errorCodes = // This file is used by the error message display website and
162
162
  'parameter.'
163
163
  },
164
164
 
165
- 40: {
165
+ 39: {
166
166
  file: "@apollo/client/link/persisted-queries/index.js",
167
167
  condition: "forward",
168
168
  message: 'PersistedQueryLink cannot be the last link in the chain.'
169
169
  },
170
170
 
171
- 42: {
171
+ 41: {
172
172
  file: "@apollo/client/link/utils/validateOperation.js",
173
173
  message: "illegal argument: %s"
174
174
  },
175
175
 
176
- 43: {
176
+ 42: {
177
177
  file: "@apollo/client/react/context/ApolloConsumer.js",
178
178
  condition: "context && context.client",
179
179
 
@@ -181,7 +181,7 @@ const errorCodes = // This file is used by the error message display website and
181
181
  'Wrap the root component in an <ApolloProvider>.'
182
182
  },
183
183
 
184
- 44: {
184
+ 43: {
185
185
  file: "@apollo/client/react/context/ApolloContext.js",
186
186
  condition: "'createContext' in React",
187
187
 
@@ -191,7 +191,7 @@ const errorCodes = // This file is used by the error message display website and
191
191
  'For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components'
192
192
  },
193
193
 
194
- 45: {
194
+ 44: {
195
195
  file: "@apollo/client/react/context/ApolloProvider.js",
196
196
  condition: "context.client",
197
197
 
@@ -199,7 +199,7 @@ const errorCodes = // This file is used by the error message display website and
199
199
  'sure you pass in your client via the "client" prop.'
200
200
  },
201
201
 
202
- 46: {
202
+ 45: {
203
203
  file: "@apollo/client/react/hoc/hoc-utils.js",
204
204
  condition: "this.withRef",
205
205
 
@@ -207,7 +207,7 @@ const errorCodes = // This file is used by the error message display website and
207
207
  "{ withRef: true } in the options"
208
208
  },
209
209
 
210
- 47: {
210
+ 46: {
211
211
  file: "@apollo/client/react/hoc/withApollo.js",
212
212
  condition: "operationOptions.withRef",
213
213
 
@@ -215,7 +215,7 @@ const errorCodes = // This file is used by the error message display website and
215
215
  "{ withRef: true } in the options"
216
216
  },
217
217
 
218
- 48: {
218
+ 47: {
219
219
  file: "@apollo/client/react/hooks/useApolloClient.js",
220
220
  condition: "!!client",
221
221
 
@@ -224,7 +224,7 @@ const errorCodes = // This file is used by the error message display website and
224
224
  'instance in via options.'
225
225
  },
226
226
 
227
- 50: {
227
+ 49: {
228
228
  file: "@apollo/client/react/hooks/useReadQuery.js",
229
229
  condition: "internalQueryRef.promiseCache",
230
230
 
@@ -233,7 +233,7 @@ const errorCodes = // This file is used by the error message display website and
233
233
  'Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`.'
234
234
  },
235
235
 
236
- 55: {
236
+ 54: {
237
237
  file: "@apollo/client/react/hooks/useSuspenseCache.js",
238
238
  condition: "suspenseCache",
239
239
 
@@ -242,13 +242,13 @@ const errorCodes = // This file is used by the error message display website and
242
242
  'or pass a SuspenseCache instance in via options.'
243
243
  },
244
244
 
245
- 56: {
245
+ 55: {
246
246
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
247
247
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
248
248
  message: "The fetch policy `%s` is not supported with suspense."
249
249
  },
250
250
 
251
- 59: {
251
+ 58: {
252
252
  file: "@apollo/client/react/parser/index.js",
253
253
  condition: "!!document && !!document.kind",
254
254
 
@@ -257,7 +257,7 @@ const errorCodes = // This file is used by the error message display website and
257
257
  "to convert your operation into a document"
258
258
  },
259
259
 
260
- 60: {
260
+ 59: {
261
261
  file: "@apollo/client/react/parser/index.js",
262
262
  condition: "!fragments.length ||\n (queries.length || mutations.length || subscriptions.length)",
263
263
 
@@ -265,7 +265,7 @@ const errorCodes = // This file is used by the error message display website and
265
265
  "You must include a query, subscription or mutation as well"
266
266
  },
267
267
 
268
- 61: {
268
+ 60: {
269
269
  file: "@apollo/client/react/parser/index.js",
270
270
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
271
271
 
@@ -275,7 +275,7 @@ const errorCodes = // This file is used by the error message display website and
275
275
  "You can use 'compose' to join multiple operation types to a component"
276
276
  },
277
277
 
278
- 62: {
278
+ 61: {
279
279
  file: "@apollo/client/react/parser/index.js",
280
280
  condition: "definitions.length === 1",
281
281
 
@@ -284,7 +284,7 @@ const errorCodes = // This file is used by the error message display website and
284
284
  "You can use 'compose' to join multiple operation types to a component"
285
285
  },
286
286
 
287
- 63: {
287
+ 62: {
288
288
  file: "@apollo/client/react/parser/index.js",
289
289
  condition: "operation.type === type",
290
290
 
@@ -292,108 +292,108 @@ const errorCodes = // This file is used by the error message display website and
292
292
  "%s, but a %s was used instead."
293
293
  },
294
294
 
295
- 64: {
295
+ 63: {
296
296
  file: "@apollo/client/testing/core/mocking/mockLink.js",
297
297
  condition: "queryWithoutConnection",
298
298
  message: "query is required"
299
299
  },
300
300
 
301
- 65: {
301
+ 64: {
302
302
  file: "@apollo/client/utilities/graphql/DocumentTransform.js",
303
303
  condition: "Array.isArray(cacheKeys)",
304
304
  message: '`getCacheKey` must return an array or undefined'
305
305
  },
306
306
 
307
- 66: {
307
+ 65: {
308
308
  file: "@apollo/client/utilities/graphql/directives.js",
309
309
  condition: "evaledValue !== void 0",
310
310
  message: "Invalid variable referenced in @%s directive."
311
311
  },
312
312
 
313
- 67: {
313
+ 66: {
314
314
  file: "@apollo/client/utilities/graphql/directives.js",
315
315
  condition: "directiveArguments && directiveArguments.length === 1",
316
316
  message: "Incorrect number of arguments for the @%s directive."
317
317
  },
318
318
 
319
- 68: {
319
+ 67: {
320
320
  file: "@apollo/client/utilities/graphql/directives.js",
321
321
  condition: "ifArgument.name && ifArgument.name.value === 'if'",
322
322
  message: "Invalid argument for the @%s directive."
323
323
  },
324
324
 
325
- 69: {
325
+ 68: {
326
326
  file: "@apollo/client/utilities/graphql/directives.js",
327
327
  condition: "ifValue &&\n (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue')",
328
328
  message: "Argument for the @%s directive must be a variable or a boolean value."
329
329
  },
330
330
 
331
- 70: {
331
+ 69: {
332
332
  file: "@apollo/client/utilities/graphql/fragments.js",
333
333
 
334
334
  message: "Found a %s operation%s. " +
335
335
  'No operations are allowed when using a fragment as a query. Only fragments are allowed.'
336
336
  },
337
337
 
338
- 71: {
338
+ 70: {
339
339
  file: "@apollo/client/utilities/graphql/fragments.js",
340
340
  condition: "fragments.length === 1",
341
341
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
342
342
  },
343
343
 
344
- 72: {
344
+ 71: {
345
345
  file: "@apollo/client/utilities/graphql/fragments.js",
346
346
  condition: "fragment",
347
347
  message: "No fragment named %s"
348
348
  },
349
349
 
350
- 73: {
350
+ 72: {
351
351
  file: "@apollo/client/utilities/graphql/getFromAST.js",
352
352
  condition: "doc && doc.kind === 'Document'",
353
353
  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"
354
354
  },
355
355
 
356
- 74: {
356
+ 73: {
357
357
  file: "@apollo/client/utilities/graphql/getFromAST.js",
358
358
  message: "Schema type definitions not allowed in queries. Found: \"%s\""
359
359
  },
360
360
 
361
- 75: {
361
+ 74: {
362
362
  file: "@apollo/client/utilities/graphql/getFromAST.js",
363
363
  condition: "operations.length <= 1",
364
364
  message: "Ambiguous GraphQL document: contains %s operations"
365
365
  },
366
366
 
367
- 76: {
367
+ 75: {
368
368
  file: "@apollo/client/utilities/graphql/getFromAST.js",
369
369
  condition: "queryDef && queryDef.operation === 'query'",
370
370
  message: 'Must contain a query definition.'
371
371
  },
372
372
 
373
- 77: {
373
+ 76: {
374
374
  file: "@apollo/client/utilities/graphql/getFromAST.js",
375
375
  condition: "doc.kind === 'Document'",
376
376
  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"
377
377
  },
378
378
 
379
- 78: {
379
+ 77: {
380
380
  file: "@apollo/client/utilities/graphql/getFromAST.js",
381
381
  condition: "doc.definitions.length <= 1",
382
382
  message: 'Fragment must have exactly one definition.'
383
383
  },
384
384
 
385
- 79: {
385
+ 78: {
386
386
  file: "@apollo/client/utilities/graphql/getFromAST.js",
387
387
  condition: "fragmentDef.kind === 'FragmentDefinition'",
388
388
  message: 'Must be a fragment definition.'
389
389
  },
390
390
 
391
- 80: {
391
+ 79: {
392
392
  file: "@apollo/client/utilities/graphql/getFromAST.js",
393
393
  message: 'Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.'
394
394
  },
395
395
 
396
- 81: {
396
+ 80: {
397
397
  file: "@apollo/client/utilities/graphql/storeUtils.js",
398
398
 
399
399
  message: "The inline argument \"%s\" of kind \"%s\"" +
@@ -403,25 +403,18 @@ const errorCodes = // This file is used by the error message display website and
403
403
  };
404
404
 
405
405
  const devDebug = {
406
- 16: {
406
+ 15: {
407
407
  file: "@apollo/client/core/ApolloClient.js",
408
408
  message: "In client.refetchQueries, Promise.all promise rejected with error %o"
409
409
  },
410
410
 
411
- 23: {
411
+ 22: {
412
412
  file: "@apollo/client/core/ObservableQuery.js",
413
413
  message: "Missing cache result fields: %o"
414
414
  }
415
415
  };
416
416
 
417
- const devLog = {
418
- 14: {
419
- file: "@apollo/client/core/ApolloClient.js",
420
-
421
- message: "Download the Apollo DevTools for a better development " +
422
- "experience: %s"
423
- }
424
- };
417
+ const devLog = {};
425
418
 
426
419
  const devWarn = {
427
420
  4: {
@@ -436,70 +429,70 @@ const devWarn = {
436
429
 
437
430
  12: {
438
431
  file: "@apollo/client/cache/inmemory/writeToStore.js",
439
- message: "Cache data may be lost when replacing the %s field of a %s object.\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: %s\n incoming: %s\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"
432
+ 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: %s\n incoming: %s\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"
440
433
  },
441
434
 
442
- 19: {
435
+ 18: {
443
436
  file: "@apollo/client/core/ObservableQuery.js",
444
437
  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 })?"
445
438
  },
446
439
 
447
- 32: {
440
+ 31: {
448
441
  file: "@apollo/client/core/QueryManager.js",
449
442
  message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
450
443
  },
451
444
 
452
- 33: {
445
+ 32: {
453
446
  file: "@apollo/client/core/QueryManager.js",
454
447
  message: "Unknown query %s requested in refetchQueries options.include array"
455
448
  },
456
449
 
457
- 34: {
450
+ 33: {
458
451
  file: "@apollo/client/link/core/ApolloLink.js",
459
452
  message: "You are calling concat on a terminating link, which will have no effect %o"
460
453
  },
461
454
 
462
- 37: {
455
+ 36: {
463
456
  file: "@apollo/client/link/http/createHttpLink.js",
464
457
  message: "Multipart-subscriptions do not support @defer"
465
458
  },
466
459
 
467
- 41: {
460
+ 40: {
468
461
  file: "@apollo/client/link/utils/toPromise.js",
469
462
  message: "Promise Wrapper does not support multiple results from Observable"
470
463
  },
471
464
 
472
- 49: {
465
+ 48: {
473
466
  file: "@apollo/client/react/hooks/useQuery.js",
474
467
  message: "Calling default no-op implementation of InternalState#forceUpdate"
475
468
  },
476
469
 
477
- 51: {
470
+ 50: {
478
471
  file: "@apollo/client/react/hooks/useSubscription.js",
479
472
  message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
480
473
  },
481
474
 
482
- 52: {
475
+ 51: {
483
476
  file: "@apollo/client/react/hooks/useSubscription.js",
484
477
  message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
485
478
  },
486
479
 
487
- 53: {
480
+ 52: {
488
481
  file: "@apollo/client/react/hooks/useSubscription.js",
489
482
  message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
490
483
  },
491
484
 
492
- 54: {
485
+ 53: {
493
486
  file: "@apollo/client/react/hooks/useSubscription.js",
494
487
  message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
495
488
  },
496
489
 
497
- 57: {
490
+ 56: {
498
491
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
499
492
  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.'
500
493
  },
501
494
 
502
- 83: {
495
+ 82: {
503
496
  file: "@apollo/client/utilities/graphql/transform.js",
504
497
 
505
498
  message: 'Removing an @connection directive even though it does not have a key. ' +
@@ -513,28 +506,28 @@ const devError = {
513
506
  message: "Missing field '%s' while writing result %o"
514
507
  },
515
508
 
516
- 20: {
509
+ 19: {
517
510
  file: "@apollo/client/core/ObservableQuery.js",
518
511
  message: 'Unhandled GraphQL subscription error'
519
512
  },
520
513
 
521
- 22: {
514
+ 21: {
522
515
  file: "@apollo/client/core/ObservableQuery.js",
523
516
  message: 'Unhandled error'
524
517
  },
525
518
 
526
- 58: {
519
+ 57: {
527
520
  file: "@apollo/client/react/hooks/useSyncExternalStore.js",
528
521
  message: 'The result of getSnapshot should be cached to avoid an infinite loop'
529
522
  },
530
523
 
531
- 82: {
524
+ 81: {
532
525
  file: "@apollo/client/utilities/graphql/transform.js",
533
526
  message: "Could not find operation or fragment"
534
527
  }
535
528
  };
536
529
 
537
- var version = '3.8.0-beta.5';
530
+ var version = '3.8.0-beta.7';
538
531
 
539
532
  function maybe(thunk) {
540
533
  try {
@@ -546,8 +539,7 @@ function maybe(thunk) {
546
539
  var global$1 = (maybe(function () { return globalThis; }) ||
547
540
  maybe(function () { return window; }) ||
548
541
  maybe(function () { return self; }) ||
549
- maybe(function () { return global; }) ||
550
- maybe(function () { return maybe.constructor("return this")(); }));
542
+ maybe(function () { return global; }) || maybe(function () { return maybe.constructor("return this")(); }));
551
543
 
552
544
  var prefixCounts = new Map();
553
545
  function makeUniqueId(prefix) {