@apollo/client 4.0.0-rc.6 → 4.0.0-rc.8

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 (351) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/__cjs/cache/core/cache.cjs +12 -7
  3. package/__cjs/cache/core/cache.cjs.map +1 -1
  4. package/__cjs/cache/core/cache.d.cts +12 -7
  5. package/__cjs/core/ApolloClient.cjs +2 -2
  6. package/__cjs/core/ApolloClient.cjs.map +1 -1
  7. package/__cjs/core/ApolloClient.d.cts +80 -98
  8. package/__cjs/core/ObservableQuery.d.cts +41 -74
  9. package/__cjs/core/QueryInfo.cjs.map +1 -1
  10. package/__cjs/core/QueryInfo.d.cts +3 -3
  11. package/__cjs/core/QueryManager.cjs +0 -2
  12. package/__cjs/core/QueryManager.cjs.map +1 -1
  13. package/__cjs/core/QueryManager.d.cts +3 -3
  14. package/__cjs/core/index.cjs +1 -2
  15. package/__cjs/core/index.cjs.map +1 -1
  16. package/__cjs/core/index.d.cts +2 -3
  17. package/__cjs/core/types.d.cts +40 -28
  18. package/__cjs/errors/CombinedGraphQLErrors.cjs +22 -17
  19. package/__cjs/errors/CombinedGraphQLErrors.cjs.map +1 -1
  20. package/__cjs/errors/CombinedGraphQLErrors.d.cts +39 -20
  21. package/__cjs/errors/CombinedProtocolErrors.cjs +12 -6
  22. package/__cjs/errors/CombinedProtocolErrors.cjs.map +1 -1
  23. package/__cjs/errors/CombinedProtocolErrors.d.cts +12 -6
  24. package/__cjs/errors/ServerError.cjs +2 -1
  25. package/__cjs/errors/ServerError.cjs.map +1 -1
  26. package/__cjs/errors/ServerError.d.cts +2 -1
  27. package/__cjs/errors/ServerParseError.cjs +2 -1
  28. package/__cjs/errors/ServerParseError.cjs.map +1 -1
  29. package/__cjs/errors/ServerParseError.d.cts +2 -1
  30. package/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
  31. package/__cjs/incremental/handlers/defer20220824.d.cts +4 -4
  32. package/__cjs/incremental/handlers/notImplemented.cjs.map +1 -1
  33. package/__cjs/incremental/handlers/notImplemented.d.cts +2 -2
  34. package/__cjs/incremental/types.d.cts +4 -4
  35. package/__cjs/invariantErrorCodes.cjs +15 -11
  36. package/__cjs/link/batch/batchLink.cjs +4 -12
  37. package/__cjs/link/batch/batchLink.cjs.map +1 -1
  38. package/__cjs/link/batch/batchLink.d.cts +36 -28
  39. package/__cjs/link/batch/batching.cjs +1 -1
  40. package/__cjs/link/batch/batching.cjs.map +1 -1
  41. package/__cjs/link/batch/batching.d.cts +8 -8
  42. package/__cjs/link/batch/index.cjs +1 -2
  43. package/__cjs/link/batch/index.cjs.map +1 -1
  44. package/__cjs/link/batch/index.d.cts +1 -2
  45. package/__cjs/link/batch-http/batchHttpLink.cjs +29 -6
  46. package/__cjs/link/batch-http/batchHttpLink.cjs.map +1 -1
  47. package/__cjs/link/batch-http/batchHttpLink.d.cts +45 -6
  48. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs +33 -0
  49. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs.map +1 -1
  50. package/__cjs/link/client-awareness/ClientAwarenessLink.d.cts +35 -2
  51. package/__cjs/link/context/index.cjs.map +1 -1
  52. package/__cjs/link/context/index.d.cts +3 -4
  53. package/__cjs/link/core/ApolloLink.cjs +226 -54
  54. package/__cjs/link/core/ApolloLink.cjs.map +1 -1
  55. package/__cjs/link/core/ApolloLink.d.cts +355 -9
  56. package/__cjs/link/core/concat.cjs +4 -0
  57. package/__cjs/link/core/concat.cjs.map +1 -1
  58. package/__cjs/link/core/concat.d.cts +4 -0
  59. package/__cjs/link/core/deprecated.cjs +3 -0
  60. package/__cjs/link/core/deprecated.cjs.map +1 -0
  61. package/__cjs/link/core/deprecated.d.cts +10 -0
  62. package/__cjs/link/core/empty.cjs +4 -0
  63. package/__cjs/link/core/empty.cjs.map +1 -1
  64. package/__cjs/link/core/empty.d.cts +4 -0
  65. package/__cjs/link/core/from.cjs +4 -0
  66. package/__cjs/link/core/from.cjs.map +1 -1
  67. package/__cjs/link/core/from.d.cts +4 -0
  68. package/__cjs/link/core/split.cjs +4 -0
  69. package/__cjs/link/core/split.cjs.map +1 -1
  70. package/__cjs/link/core/split.d.cts +4 -0
  71. package/__cjs/link/core/types.d.cts +2 -33
  72. package/__cjs/link/error/index.cjs +44 -0
  73. package/__cjs/link/error/index.cjs.map +1 -1
  74. package/__cjs/link/error/index.d.cts +68 -9
  75. package/__cjs/link/http/BaseHttpLink.cjs +3 -4
  76. package/__cjs/link/http/BaseHttpLink.cjs.map +1 -1
  77. package/__cjs/link/http/HttpLink.cjs +26 -1
  78. package/__cjs/link/http/HttpLink.cjs.map +1 -1
  79. package/__cjs/link/http/HttpLink.d.cts +191 -89
  80. package/__cjs/link/http/index.cjs +1 -3
  81. package/__cjs/link/http/index.cjs.map +1 -1
  82. package/__cjs/link/http/index.d.cts +0 -2
  83. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +40 -25
  84. package/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
  85. package/__cjs/link/http/parseAndCheckHttpResponse.d.cts +2 -2
  86. package/__cjs/link/http/rewriteURIForGET.cjs +2 -3
  87. package/__cjs/link/http/rewriteURIForGET.cjs.map +1 -1
  88. package/__cjs/link/http/selectHttpOptionsAndBody.cjs.map +1 -1
  89. package/__cjs/link/http/selectHttpOptionsAndBody.d.cts +3 -3
  90. package/__cjs/link/http/selectURI.cjs.map +1 -1
  91. package/__cjs/link/http/selectURI.d.cts +2 -2
  92. package/__cjs/link/index.cjs.map +1 -1
  93. package/__cjs/link/index.d.cts +2 -1
  94. package/__cjs/link/persisted-queries/index.cjs.map +1 -1
  95. package/__cjs/link/persisted-queries/index.d.cts +23 -25
  96. package/__cjs/link/remove-typename/index.cjs.map +1 -1
  97. package/__cjs/link/remove-typename/index.d.cts +0 -1
  98. package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
  99. package/__cjs/link/remove-typename/removeTypenameFromVariables.d.cts +9 -8
  100. package/__cjs/link/retry/delayFunction.cjs.map +1 -1
  101. package/__cjs/link/retry/delayFunction.d.cts +2 -39
  102. package/__cjs/link/retry/retryFunction.cjs.map +1 -1
  103. package/__cjs/link/retry/retryFunction.d.cts +2 -29
  104. package/__cjs/link/retry/retryLink.cjs +12 -9
  105. package/__cjs/link/retry/retryLink.cjs.map +1 -1
  106. package/__cjs/link/retry/retryLink.d.cts +57 -6
  107. package/__cjs/link/schema/index.cjs.map +1 -1
  108. package/__cjs/link/schema/index.d.cts +3 -4
  109. package/__cjs/link/subscriptions/index.cjs +23 -0
  110. package/__cjs/link/subscriptions/index.cjs.map +1 -1
  111. package/__cjs/link/subscriptions/index.d.cts +24 -2
  112. package/__cjs/link/utils/createOperation.cjs +12 -4
  113. package/__cjs/link/utils/createOperation.cjs.map +1 -1
  114. package/__cjs/link/utils/createOperation.d.cts +2 -2
  115. package/__cjs/link/utils/index.cjs +1 -5
  116. package/__cjs/link/utils/index.cjs.map +1 -1
  117. package/__cjs/link/utils/index.d.cts +0 -2
  118. package/__cjs/link/ws/index.cjs +17 -1
  119. package/__cjs/link/ws/index.cjs.map +1 -1
  120. package/__cjs/link/ws/index.d.cts +8 -2
  121. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  122. package/__cjs/react/hooks/useBackgroundQuery.d.cts +125 -93
  123. package/__cjs/react/hooks/useFragment.cjs.map +1 -1
  124. package/__cjs/react/hooks/useFragment.d.cts +2 -2
  125. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  126. package/__cjs/react/hooks/useLazyQuery.d.cts +70 -108
  127. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  128. package/__cjs/react/hooks/useLoadableQuery.d.cts +52 -61
  129. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  130. package/__cjs/react/hooks/useMutation.d.cts +36 -54
  131. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  132. package/__cjs/react/hooks/useQuery.d.cts +64 -105
  133. package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
  134. package/__cjs/react/hooks/useQueryRefHandlers.d.cts +17 -8
  135. package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
  136. package/__cjs/react/hooks/useReadQuery.d.cts +6 -9
  137. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  138. package/__cjs/react/hooks/useSubscription.d.cts +32 -24
  139. package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
  140. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  141. package/__cjs/react/hooks/useSuspenseQuery.d.cts +75 -94
  142. package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
  143. package/__cjs/react/internal/cache/QueryReference.d.cts +3 -1
  144. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  145. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +29 -20
  146. package/__cjs/react/types/types.documentation.d.cts +5 -5
  147. package/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
  148. package/__cjs/testing/core/mocking/mockLink.d.cts +5 -6
  149. package/__cjs/testing/core/mocking/mockSubscriptionLink.cjs.map +1 -1
  150. package/__cjs/testing/core/mocking/mockSubscriptionLink.d.cts +3 -4
  151. package/__cjs/utilities/internal/types/DocumentationTypes.d.cts +20 -28
  152. package/__cjs/utilities/internal/types/VariablesOption.d.cts +2 -6
  153. package/__cjs/utilities/subscriptions/relay/index.cjs +1 -2
  154. package/__cjs/utilities/subscriptions/relay/index.cjs.map +1 -1
  155. package/__cjs/version.cjs +1 -1
  156. package/cache/core/cache.d.ts +12 -7
  157. package/cache/core/cache.js +12 -7
  158. package/cache/core/cache.js.map +1 -1
  159. package/core/ApolloClient.d.ts +80 -98
  160. package/core/ApolloClient.js +2 -2
  161. package/core/ApolloClient.js.map +1 -1
  162. package/core/ObservableQuery.d.ts +41 -74
  163. package/core/QueryInfo.d.ts +3 -3
  164. package/core/QueryInfo.js.map +1 -1
  165. package/core/QueryManager.d.ts +3 -3
  166. package/core/QueryManager.js +0 -2
  167. package/core/QueryManager.js.map +1 -1
  168. package/core/index.d.ts +2 -3
  169. package/core/index.js +1 -1
  170. package/core/index.js.map +1 -1
  171. package/core/types.d.ts +40 -28
  172. package/errors/CombinedGraphQLErrors.d.ts +39 -20
  173. package/errors/CombinedGraphQLErrors.js +22 -17
  174. package/errors/CombinedGraphQLErrors.js.map +1 -1
  175. package/errors/CombinedProtocolErrors.d.ts +12 -6
  176. package/errors/CombinedProtocolErrors.js +12 -6
  177. package/errors/CombinedProtocolErrors.js.map +1 -1
  178. package/errors/ServerError.d.ts +2 -1
  179. package/errors/ServerError.js +2 -1
  180. package/errors/ServerError.js.map +1 -1
  181. package/errors/ServerParseError.d.ts +2 -1
  182. package/errors/ServerParseError.js +2 -1
  183. package/errors/ServerParseError.js.map +1 -1
  184. package/incremental/handlers/defer20220824.d.ts +4 -4
  185. package/incremental/handlers/defer20220824.js.map +1 -1
  186. package/incremental/handlers/notImplemented.d.ts +2 -2
  187. package/incremental/handlers/notImplemented.js.map +1 -1
  188. package/incremental/types.d.ts +4 -4
  189. package/incremental/types.js.map +1 -1
  190. package/invariantErrorCodes.js +15 -11
  191. package/link/batch/batchLink.d.ts +37 -29
  192. package/link/batch/batchLink.js +3 -10
  193. package/link/batch/batchLink.js.map +1 -1
  194. package/link/batch/batching.d.ts +8 -8
  195. package/link/batch/batching.js +2 -2
  196. package/link/batch/batching.js.map +1 -1
  197. package/link/batch/index.d.ts +1 -2
  198. package/link/batch/index.js +1 -1
  199. package/link/batch/index.js.map +1 -1
  200. package/link/batch-http/batchHttpLink.d.ts +46 -7
  201. package/link/batch-http/batchHttpLink.js +30 -7
  202. package/link/batch-http/batchHttpLink.js.map +1 -1
  203. package/link/client-awareness/ClientAwarenessLink.d.ts +35 -2
  204. package/link/client-awareness/ClientAwarenessLink.js +33 -0
  205. package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
  206. package/link/context/index.d.ts +3 -4
  207. package/link/context/index.js.map +1 -1
  208. package/link/core/ApolloLink.d.ts +355 -9
  209. package/link/core/ApolloLink.js +227 -56
  210. package/link/core/ApolloLink.js.map +1 -1
  211. package/link/core/concat.d.ts +4 -0
  212. package/link/core/concat.js +4 -0
  213. package/link/core/concat.js.map +1 -1
  214. package/link/core/deprecated.d.ts +10 -0
  215. package/link/core/deprecated.js +2 -0
  216. package/link/core/deprecated.js.map +1 -0
  217. package/link/core/empty.d.ts +4 -0
  218. package/link/core/empty.js +4 -0
  219. package/link/core/empty.js.map +1 -1
  220. package/link/core/from.d.ts +4 -0
  221. package/link/core/from.js +4 -0
  222. package/link/core/from.js.map +1 -1
  223. package/link/core/split.d.ts +4 -0
  224. package/link/core/split.js +4 -0
  225. package/link/core/split.js.map +1 -1
  226. package/link/core/types.d.ts +2 -33
  227. package/link/core/types.js.map +1 -1
  228. package/link/error/index.d.ts +69 -10
  229. package/link/error/index.js +44 -0
  230. package/link/error/index.js.map +1 -1
  231. package/link/http/BaseHttpLink.js +3 -4
  232. package/link/http/BaseHttpLink.js.map +1 -1
  233. package/link/http/HttpLink.d.ts +192 -90
  234. package/link/http/HttpLink.js +26 -1
  235. package/link/http/HttpLink.js.map +1 -1
  236. package/link/http/index.d.ts +0 -2
  237. package/link/http/index.js +0 -1
  238. package/link/http/index.js.map +1 -1
  239. package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
  240. package/link/http/parseAndCheckHttpResponse.js +40 -25
  241. package/link/http/parseAndCheckHttpResponse.js.map +1 -1
  242. package/link/http/rewriteURIForGET.js +2 -3
  243. package/link/http/rewriteURIForGET.js.map +1 -1
  244. package/link/http/selectHttpOptionsAndBody.d.ts +3 -3
  245. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  246. package/link/http/selectURI.d.ts +2 -2
  247. package/link/http/selectURI.js.map +1 -1
  248. package/link/index.d.ts +2 -1
  249. package/link/index.js.map +1 -1
  250. package/link/persisted-queries/index.d.ts +23 -25
  251. package/link/persisted-queries/index.js.map +1 -1
  252. package/link/remove-typename/index.d.ts +0 -1
  253. package/link/remove-typename/index.js.map +1 -1
  254. package/link/remove-typename/removeTypenameFromVariables.d.ts +9 -8
  255. package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
  256. package/link/retry/delayFunction.d.ts +2 -39
  257. package/link/retry/delayFunction.js.map +1 -1
  258. package/link/retry/retryFunction.d.ts +2 -29
  259. package/link/retry/retryFunction.js.map +1 -1
  260. package/link/retry/retryLink.d.ts +57 -6
  261. package/link/retry/retryLink.js +13 -10
  262. package/link/retry/retryLink.js.map +1 -1
  263. package/link/schema/index.d.ts +3 -4
  264. package/link/schema/index.js.map +1 -1
  265. package/link/subscriptions/index.d.ts +24 -2
  266. package/link/subscriptions/index.js +23 -0
  267. package/link/subscriptions/index.js.map +1 -1
  268. package/link/utils/createOperation.d.ts +2 -2
  269. package/link/utils/createOperation.js +12 -4
  270. package/link/utils/createOperation.js.map +1 -1
  271. package/link/utils/index.d.ts +0 -2
  272. package/link/utils/index.js +0 -2
  273. package/link/utils/index.js.map +1 -1
  274. package/link/ws/index.d.ts +8 -2
  275. package/link/ws/index.js +13 -1
  276. package/link/ws/index.js.map +1 -1
  277. package/package.json +1 -1
  278. package/react/hooks/useBackgroundQuery.d.ts +125 -93
  279. package/react/hooks/useBackgroundQuery.js.map +1 -1
  280. package/react/hooks/useFragment.d.ts +2 -2
  281. package/react/hooks/useFragment.js.map +1 -1
  282. package/react/hooks/useLazyQuery.d.ts +70 -108
  283. package/react/hooks/useLazyQuery.js.map +1 -1
  284. package/react/hooks/useLoadableQuery.d.ts +52 -61
  285. package/react/hooks/useLoadableQuery.js.map +1 -1
  286. package/react/hooks/useMutation.d.ts +36 -54
  287. package/react/hooks/useMutation.js.map +1 -1
  288. package/react/hooks/useQuery.d.ts +64 -105
  289. package/react/hooks/useQuery.js.map +1 -1
  290. package/react/hooks/useQueryRefHandlers.d.ts +17 -8
  291. package/react/hooks/useQueryRefHandlers.js.map +1 -1
  292. package/react/hooks/useReadQuery.d.ts +6 -9
  293. package/react/hooks/useReadQuery.js.map +1 -1
  294. package/react/hooks/useSubscription.d.ts +32 -24
  295. package/react/hooks/useSubscription.js.map +1 -1
  296. package/react/hooks/useSuspenseFragment.js.map +1 -1
  297. package/react/hooks/useSuspenseQuery.d.ts +75 -94
  298. package/react/hooks/useSuspenseQuery.js.map +1 -1
  299. package/react/hooks-compiled/useBackgroundQuery.d.ts +125 -93
  300. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  301. package/react/hooks-compiled/useFragment.d.ts +2 -2
  302. package/react/hooks-compiled/useFragment.js.map +1 -1
  303. package/react/hooks-compiled/useLazyQuery.d.ts +70 -108
  304. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  305. package/react/hooks-compiled/useLoadableQuery.d.ts +52 -61
  306. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  307. package/react/hooks-compiled/useMutation.d.ts +36 -54
  308. package/react/hooks-compiled/useMutation.js.map +1 -1
  309. package/react/hooks-compiled/useQuery.d.ts +64 -105
  310. package/react/hooks-compiled/useQuery.js.map +1 -1
  311. package/react/hooks-compiled/useQueryRefHandlers.d.ts +17 -8
  312. package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
  313. package/react/hooks-compiled/useReadQuery.d.ts +6 -9
  314. package/react/hooks-compiled/useReadQuery.js.map +1 -1
  315. package/react/hooks-compiled/useSubscription.d.ts +32 -24
  316. package/react/hooks-compiled/useSubscription.js.map +1 -1
  317. package/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
  318. package/react/hooks-compiled/useSuspenseQuery.d.ts +75 -94
  319. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  320. package/react/internal/cache/QueryReference.d.ts +3 -1
  321. package/react/internal/cache/QueryReference.js.map +1 -1
  322. package/react/query-preloader/createQueryPreloader.d.ts +29 -20
  323. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  324. package/react/types/types.documentation.d.ts +5 -5
  325. package/testing/core/mocking/mockLink.d.ts +5 -6
  326. package/testing/core/mocking/mockLink.js.map +1 -1
  327. package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -4
  328. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
  329. package/utilities/internal/types/DocumentationTypes.d.ts +20 -28
  330. package/utilities/internal/types/VariablesOption.d.ts +2 -6
  331. package/utilities/subscriptions/relay/index.js +1 -2
  332. package/utilities/subscriptions/relay/index.js.map +1 -1
  333. package/version.js +1 -1
  334. package/__cjs/link/http/serializeFetchParameter.cjs +0 -18
  335. package/__cjs/link/http/serializeFetchParameter.cjs.map +0 -1
  336. package/__cjs/link/http/serializeFetchParameter.d.cts +0 -6
  337. package/__cjs/link/utils/transformOperation.cjs +0 -22
  338. package/__cjs/link/utils/transformOperation.cjs.map +0 -1
  339. package/__cjs/link/utils/transformOperation.d.cts +0 -3
  340. package/__cjs/link/utils/validateOperation.cjs +0 -21
  341. package/__cjs/link/utils/validateOperation.cjs.map +0 -1
  342. package/__cjs/link/utils/validateOperation.d.cts +0 -3
  343. package/link/http/serializeFetchParameter.d.ts +0 -6
  344. package/link/http/serializeFetchParameter.js +0 -14
  345. package/link/http/serializeFetchParameter.js.map +0 -1
  346. package/link/utils/transformOperation.d.ts +0 -3
  347. package/link/utils/transformOperation.js +0 -19
  348. package/link/utils/transformOperation.js.map +0 -1
  349. package/link/utils/validateOperation.d.ts +0 -3
  350. package/link/utils/validateOperation.js +0 -18
  351. package/link/utils/validateOperation.js.map +0 -1
@@ -18,33 +18,30 @@ export declare namespace ObservableQuery {
18
18
  *
19
19
  * The default value is `cache-first`.
20
20
  *
21
- * @docGroup
22
- *
23
- * 3. Caching options
21
+ * @docGroup 3. Caching options
24
22
  */
25
23
  fetchPolicy: WatchQueryFetchPolicy;
26
24
  /**
27
25
  * Specifies the `FetchPolicy` to be used after this query has completed.
28
26
  *
29
- * @docGroup
30
- *
31
- * 3. Caching options
27
+ * @docGroup 3. Caching options
32
28
  */
33
29
  nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions<TData, TVariables>, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext<TData, TVariables>) => WatchQueryFetchPolicy);
34
30
  /**
35
- * Defaults to the initial value of options.fetchPolicy, but can be explicitly configured to specify the WatchQueryFetchPolicy to revert back to whenever variables change (unless nextFetchPolicy intervenes).
31
+ * Defaults to the initial value of options.fetchPolicy, but can be explicitly
32
+ * configured to specify the WatchQueryFetchPolicy to revert back to whenever
33
+ * variables change (unless nextFetchPolicy intervenes).
36
34
  *
37
- * @docGroup
38
- *
39
- * 3. Caching options
35
+ * @docGroup 3. Caching options
40
36
  */
41
37
  initialFetchPolicy: WatchQueryFetchPolicy;
42
38
  /**
43
- * Specifies whether a `NetworkStatus.refetch` operation should merge incoming field data with existing data, or overwrite the existing data. Overwriting is probably preferable, but merging is currently the default behavior, for backwards compatibility with Apollo Client 3.x.
44
- *
45
- * @docGroup
39
+ * Specifies whether a `NetworkStatus.refetch` operation should merge
40
+ * incoming field data with existing data, or overwrite the existing data.
41
+ * Overwriting is probably preferable, but merging is currently the default
42
+ * behavior, for backwards compatibility with Apollo Client 3.x.
46
43
  *
47
- * 3. Caching options
44
+ * @docGroup 3. Caching options
48
45
  */
49
46
  refetchWritePolicy?: RefetchWritePolicy;
50
47
  /**
@@ -54,17 +51,13 @@ export declare namespace ObservableQuery {
54
51
  *
55
52
  * The default value is `none`, meaning that the query result includes error details but not partial results.
56
53
  *
57
- * @docGroup
58
- *
59
- * 1. Operation options
54
+ * @docGroup 1. Operation options
60
55
  */
61
56
  errorPolicy?: ErrorPolicy;
62
57
  /**
63
58
  * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.
64
59
  *
65
- * @docGroup
66
- *
67
- * 2. Networking options
60
+ * @docGroup 2. Networking options
68
61
  */
69
62
  context?: DefaultContext;
70
63
  /**
@@ -72,9 +65,7 @@ export declare namespace ObservableQuery {
72
65
  *
73
66
  * The default value is `0` (no polling).
74
67
  *
75
- * @docGroup
76
- *
77
- * 2. Networking options
68
+ * @docGroup 2. Networking options
78
69
  */
79
70
  pollInterval?: number;
80
71
  /**
@@ -82,9 +73,7 @@ export declare namespace ObservableQuery {
82
73
  *
83
74
  * The default value is `true`.
84
75
  *
85
- * @docGroup
86
- *
87
- * 2. Networking options
76
+ * @docGroup 2. Networking options
88
77
  */
89
78
  notifyOnNetworkStatusChange?: boolean;
90
79
  /**
@@ -92,25 +81,21 @@ export declare namespace ObservableQuery {
92
81
  *
93
82
  * The default value is `false`.
94
83
  *
95
- * @docGroup
96
- *
97
- * 3. Caching options
84
+ * @docGroup 3. Caching options
98
85
  */
99
86
  returnPartialData?: boolean;
100
87
  /**
101
- * A callback function that's called whenever a refetch attempt occurs while polling. If the function returns `true`, the refetch is skipped and not reattempted until the next poll interval.
88
+ * A callback function that's called whenever a refetch attempt occurs
89
+ * while polling. If the function returns `true`, the refetch is
90
+ * skipped and not reattempted until the next poll interval.
102
91
  *
103
- * @docGroup
104
- *
105
- * 2. Networking options
92
+ * @docGroup 2. Networking options
106
93
  */
107
94
  skipPollAttempt?: () => boolean;
108
95
  /**
109
96
  * A GraphQL query string parsed into an AST with the gql template literal.
110
97
  *
111
- * @docGroup
112
- *
113
- * 1. Operation options
98
+ * @docGroup 1. Operation options
114
99
  */
115
100
  query: DocumentNode | TypedDocumentNode<TData, TVariables>;
116
101
  /**
@@ -118,9 +103,7 @@ export declare namespace ObservableQuery {
118
103
  *
119
104
  * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.
120
105
  *
121
- * @docGroup
122
- *
123
- * 1. Operation options
106
+ * @docGroup 1. Operation options
124
107
  */
125
108
  variables: TVariables;
126
109
  };
@@ -128,9 +111,7 @@ export declare namespace ObservableQuery {
128
111
  /**
129
112
  * A GraphQL query string parsed into an AST with the gql template literal.
130
113
  *
131
- * @docGroup
132
- *
133
- * 1. Operation options
114
+ * @docGroup 1. Operation options
134
115
  */
135
116
  query?: DocumentNode | TypedDocumentNode<TFetchData, TFetchVars>;
136
117
  /**
@@ -138,9 +119,7 @@ export declare namespace ObservableQuery {
138
119
  *
139
120
  * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.
140
121
  *
141
- * @docGroup
142
- *
143
- * 1. Operation options
122
+ * @docGroup 1. Operation options
144
123
  */
145
124
  variables?: Partial<NoInfer<TFetchVars>>;
146
125
  /**
@@ -150,17 +129,13 @@ export declare namespace ObservableQuery {
150
129
  *
151
130
  * The default value is `none`, meaning that the query result includes error details but not partial results.
152
131
  *
153
- * @docGroup
154
- *
155
- * 1. Operation options
132
+ * @docGroup 1. Operation options
156
133
  */
157
134
  errorPolicy?: ErrorPolicy;
158
135
  /**
159
136
  * If you're using [Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction/), this object is the initial value of the `context` object that's passed along your link chain.
160
137
  *
161
- * @docGroup
162
- *
163
- * 2. Networking options
138
+ * @docGroup 2. Networking options
164
139
  */
165
140
  context?: DefaultContext;
166
141
  updateQuery?: (previousQueryResult: Unmasked<TData>, options: {
@@ -200,21 +175,18 @@ export declare namespace ObservableQuery {
200
175
  }
201
176
  type Result<TData, TStates extends DataState<TData>["dataState"] = DataState<TData>["dataState"]> = {
202
177
  /**
203
- * A single ErrorLike object describing the error that occured during the latest query execution.
178
+ * A single ErrorLike object describing the error that occured during the latest
179
+ * query execution.
204
180
  *
205
181
  * For more information, see [Handling operation errors](https://www.apollographql.com/docs/react/data/error-handling/).
206
182
  *
207
- * @docGroup
208
- *
209
- * 1. Operation data
183
+ * @docGroup 1. Operation data
210
184
  */
211
185
  error?: ErrorLike;
212
186
  /**
213
187
  * If `true`, the query is still in flight and results have not yet been returned.
214
188
  *
215
- * @docGroup
216
- *
217
- * 2. Network info
189
+ * @docGroup 2. Network info
218
190
  */
219
191
  loading: boolean;
220
192
  /**
@@ -222,21 +194,15 @@ export declare namespace ObservableQuery {
222
194
  *
223
195
  * Used in conjunction with the [`notifyOnNetworkStatusChange`](#notifyonnetworkstatuschange) option.
224
196
  *
225
- * @docGroup
226
- *
227
- * 2. Network info
197
+ * @docGroup 2. Network info
228
198
  */
229
199
  networkStatus: NetworkStatus;
230
200
  /**
231
- * Describes whether `data` is a complete or partial result. This flag is only set when `returnPartialData` is `true` in query options.
232
- *
233
- * @deprecated
234
- *
235
- * This field will be removed in a future version of Apollo Client.
201
+ * Describes whether `data` is a complete or partial result. This flag is only
202
+ * set when `returnPartialData` is `true` in query options.
236
203
  *
237
- * @docGroup
238
- *
239
- * 1. Operation data
204
+ * @deprecated This field will be removed in a future version of Apollo Client.
205
+ * @docGroup 1. Operation data
240
206
  */
241
207
  partial: boolean;
242
208
  } & GetDataState<TData, TStates>;
@@ -262,9 +228,8 @@ export declare namespace ObservableQuery {
262
228
  /**
263
229
  * Used to stitch together functional operators into a chain.
264
230
  *
265
- * @returns The Observable result of all the operators having been called in the order they were passed in.
266
- *
267
231
  * @example
232
+ *
268
233
  * ```ts
269
234
  * import { filter, map } from 'rxjs';
270
235
  *
@@ -275,13 +240,15 @@ export declare namespace ObservableQuery {
275
240
  * )
276
241
  * .subscribe(x => console.log(x));
277
242
  * ```
243
+ *
244
+ * @returns The Observable result of all the operators having been called
245
+ * in the order they were passed in.
278
246
  */
279
247
  pipe(...operators: OperatorFunctionChain<ObservableQuery.Result<TData>, OperatorResult>): Observable<OperatorResult>;
280
248
  /**
281
249
  * Subscribes to the `ObservableQuery`.
282
- *
283
- * @param observerOrNext - Either an RxJS `Observer` with some or all callback methods, or the `next` handler that is called for each value emitted from the subscribed Observable.
284
- *
250
+ * @param observerOrNext - Either an RxJS `Observer` with some or all callback methods,
251
+ * or the `next` handler that is called for each value emitted from the subscribed Observable.
285
252
  * @returns A subscription reference to the registered handlers.
286
253
  */
287
254
  subscribe(observerOrNext: Partial<Observer<ObservableQuery.Result<MaybeMasked<TData>>>> | ((value: ObservableQuery.Result<MaybeMasked<TData>>) => void)): Subscription;
@@ -1,6 +1,6 @@
1
1
  import type { DocumentNode, FormattedExecutionResult } from "graphql";
2
2
  import type { ApolloCache } from "@apollo/client/cache";
3
- import type { FetchResult } from "@apollo/client/link";
3
+ import type { ApolloLink } from "@apollo/client/link";
4
4
  import type { Unmasked } from "@apollo/client/masking";
5
5
  import type { ApolloClient } from "./ApolloClient.js";
6
6
  import type { ObservableQuery } from "./ObservableQuery.js";
@@ -46,8 +46,8 @@ export declare class QueryInfo<TData, TVariables extends OperationVariables = Op
46
46
  private shouldWrite;
47
47
  get hasNext(): boolean;
48
48
  private maybeHandleIncrementalResult;
49
- markQueryResult(incoming: FetchResult<TData>, { document: query, variables, errorPolicy, cacheWriteBehavior, }: OperationInfo<TData, TVariables>): FormattedExecutionResult<DataValue.Complete<TData> | DataValue.Streaming<TData>>;
50
- markMutationResult(incoming: FetchResult<TData>, mutation: OperationInfo<TData, TVariables, CacheWriteBehavior.FORBID | CacheWriteBehavior.MERGE> & {
49
+ markQueryResult(incoming: ApolloLink.Result<TData>, { document: query, variables, errorPolicy, cacheWriteBehavior, }: OperationInfo<TData, TVariables>): FormattedExecutionResult<DataValue.Complete<TData> | DataValue.Streaming<TData>>;
50
+ markMutationResult(incoming: ApolloLink.Result<TData>, mutation: OperationInfo<TData, TVariables, CacheWriteBehavior.FORBID | CacheWriteBehavior.MERGE> & {
51
51
  context?: DefaultContext;
52
52
  updateQueries: UpdateQueries<TData>;
53
53
  update?: MutationUpdaterFunction<TData, TVariables, TCache>;