@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
@@ -11,11 +11,10 @@ export declare namespace useBackgroundQuery {
11
11
  /**
12
12
  * The instance of `ApolloClient` to use to execute the query.
13
13
  *
14
- * By default, the instance that's passed down via context is used, but you can provide a different instance here.
14
+ * By default, the instance that's passed down via context is used, but you
15
+ * can provide a different instance here.
15
16
  *
16
- * @docGroup
17
- *
18
- * 1. Operation options
17
+ * @docGroup 1. Operation options
19
18
  */
20
19
  client?: ApolloClient;
21
20
  /**
@@ -23,9 +22,7 @@ export declare namespace useBackgroundQuery {
23
22
  *
24
23
  * The default value is "overwrite".
25
24
  *
26
- * @docGroup
27
- *
28
- * 3. Caching options
25
+ * @docGroup 3. Caching options
29
26
  */
30
27
  refetchWritePolicy?: RefetchWritePolicy;
31
28
  /**
@@ -35,17 +32,13 @@ export declare namespace useBackgroundQuery {
35
32
  *
36
33
  * The default value is `none`, meaning that the query result includes error details but not partial results.
37
34
  *
38
- * @docGroup
39
- *
40
- * 1. Operation options
35
+ * @docGroup 1. Operation options
41
36
  */
42
37
  errorPolicy?: ErrorPolicy;
43
38
  /**
44
39
  * 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.
45
40
  *
46
- * @docGroup
47
- *
48
- * 2. Networking options
41
+ * @docGroup 2. Networking options
49
42
  */
50
43
  context?: DefaultContext;
51
44
  /**
@@ -53,9 +46,7 @@ export declare namespace useBackgroundQuery {
53
46
  *
54
47
  * The default value is `false`.
55
48
  *
56
- * @docGroup
57
- *
58
- * 3. Caching options
49
+ * @docGroup 3. Caching options
59
50
  */
60
51
  returnPartialData?: boolean;
61
52
  /**
@@ -65,34 +56,31 @@ export declare namespace useBackgroundQuery {
65
56
  *
66
57
  * The default value is `cache-first`.
67
58
  *
68
- * @docGroup
69
- *
70
- * 3. Caching options
59
+ * @docGroup 3. Caching options
71
60
  */
72
61
  fetchPolicy?: FetchPolicy;
73
62
  /**
74
- * A unique identifier for the query. Each item in the array must be a stable identifier to prevent infinite fetches.
75
- *
76
- * This is useful when using the same query and variables combination in more than one component, otherwise the components may clobber each other. This can also be used to force the query to re-evaluate fresh.
63
+ * A unique identifier for the query. Each item in the array must be a stable
64
+ * identifier to prevent infinite fetches.
77
65
  *
78
- * @docGroup
66
+ * This is useful when using the same query and variables combination in more
67
+ * than one component, otherwise the components may clobber each other. This
68
+ * can also be used to force the query to re-evaluate fresh.
79
69
  *
80
- * 1. Operation options
70
+ * @docGroup 1. Operation options
81
71
  */
82
72
  queryKey?: string | number | any[];
83
73
  /**
84
74
  * If `true`, the query is not executed. The default value is `false`.
85
75
  *
86
- * @deprecated
76
+ * @deprecated We recommend using `skipToken` in place of the `skip` option as
77
+ * it is more type-safe.
87
78
  *
88
- * We recommend using `skipToken` in place of the `skip` option as it is more type-safe.
89
- *
90
- * This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release. Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.
91
- *
92
- * @docGroup
93
- *
94
- * 1. Operation options
79
+ * This option is deprecated and only supported to ease the migration from `useQuery`. It will be removed in a future release.
80
+ * Please use [`skipToken`](https://www.apollographql.com/docs/react/api/react/hooks#skiptoken) instead of the `skip` option as it is more type-safe.
95
81
  *
82
+ * @docGroup 1. Operation options
83
+ *
96
84
  *
97
85
  * @example Recommended usage of `skipToken`:
98
86
  *
@@ -124,7 +112,7 @@ export declare namespace useBackgroundQuery {
124
112
  subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;
125
113
  /**
126
114
  * A function that helps you fetch the next set of results for a [paginated list field](https://www.apollographql.com/docs/react/pagination/core-api/).
127
- *
115
+ *
128
116
  *
129
117
  * @remarks
130
118
  * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).
@@ -137,12 +125,12 @@ export declare namespace useBackgroundQuery {
137
125
  *
138
126
  * See also [Refetching](https://www.apollographql.com/docs/react/data/queries/#refetching).
139
127
  *
140
- * Returns a `ResultPromise` with an additional `.retain()` method. Calling `.retain()` keeps the network operation running even if the `ObservableQuery` no longer requires the result.
141
- *
142
- * @docGroup
143
- *
144
- * 3. Helper functions
128
+ * Returns a `ResultPromise` with an additional `.retain()` method. Calling
129
+ * `.retain()` keeps the network operation running even if the `ObservableQuery`
130
+ * no longer requires the result.
145
131
  *
132
+ * @docGroup 3. Helper functions
133
+ *
146
134
  *
147
135
  * @remarks
148
136
  * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).
@@ -159,15 +147,16 @@ export declare namespace useBackgroundQuery {
159
147
  /**
160
148
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
161
149
  *
162
- * @param query - A GraphQL query document parsed into an AST by `gql`.
163
- *
164
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
165
- *
166
150
  * @returns A tuple containing:
167
151
  *
168
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
152
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
153
+ * 2. An object containing helper functions for the query:
154
+ * - `refetch`: A function to re-execute the query
155
+ * - `fetchMore`: A function to fetch more results for pagination
156
+ * - `subscribeToMore`: A function to subscribe to updates
169
157
  *
170
158
  * @example
159
+ *
171
160
  * ```jsx
172
161
  * import { Suspense } from "react";
173
162
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -212,6 +201,9 @@ export declare namespace useBackgroundQuery {
212
201
  * );
213
202
  * }
214
203
  * ```
204
+ *
205
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
206
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
215
207
  */
216
208
  function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | useBackgroundQuery.Options<TVariables>): [
217
209
  QueryRef<TData, TVariables> | undefined,
@@ -291,15 +283,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
291
283
  /**
292
284
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
293
285
  *
294
- * @param query - A GraphQL query document parsed into an AST by `gql`.
295
- *
296
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
297
- *
298
286
  * @returns A tuple containing:
299
287
  *
300
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
288
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
289
+ * 2. An object containing helper functions for the query:
290
+ * - `refetch`: A function to re-execute the query
291
+ * - `fetchMore`: A function to fetch more results for pagination
292
+ * - `subscribeToMore`: A function to subscribe to updates
301
293
  *
302
294
  * @example
295
+ *
303
296
  * ```jsx
304
297
  * import { Suspense } from "react";
305
298
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -344,6 +337,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
344
337
  * );
345
338
  * }
346
339
  * ```
340
+ *
341
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
342
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
347
343
  */
348
344
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
349
345
  returnPartialData: false;
@@ -355,15 +351,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
355
351
  /**
356
352
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
357
353
  *
358
- * @param query - A GraphQL query document parsed into an AST by `gql`.
359
- *
360
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
361
- *
362
354
  * @returns A tuple containing:
363
355
  *
364
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
356
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
357
+ * 2. An object containing helper functions for the query:
358
+ * - `refetch`: A function to re-execute the query
359
+ * - `fetchMore`: A function to fetch more results for pagination
360
+ * - `subscribeToMore`: A function to subscribe to updates
365
361
  *
366
362
  * @example
363
+ *
367
364
  * ```jsx
368
365
  * import { Suspense } from "react";
369
366
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -408,6 +405,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
408
405
  * );
409
406
  * }
410
407
  * ```
408
+ *
409
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
410
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
411
411
  */
412
412
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
413
413
  returnPartialData: boolean;
@@ -419,15 +419,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
419
419
  /**
420
420
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
421
421
  *
422
- * @param query - A GraphQL query document parsed into an AST by `gql`.
423
- *
424
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
425
- *
426
422
  * @returns A tuple containing:
427
423
  *
428
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
424
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
425
+ * 2. An object containing helper functions for the query:
426
+ * - `refetch`: A function to re-execute the query
427
+ * - `fetchMore`: A function to fetch more results for pagination
428
+ * - `subscribeToMore`: A function to subscribe to updates
429
429
  *
430
430
  * @example
431
+ *
431
432
  * ```jsx
432
433
  * import { Suspense } from "react";
433
434
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -472,6 +473,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
472
473
  * );
473
474
  * }
474
475
  * ```
476
+ *
477
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
478
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
475
479
  */
476
480
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
477
481
  errorPolicy: "ignore" | "all";
@@ -482,15 +486,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
482
486
  /**
483
487
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
484
488
  *
485
- * @param query - A GraphQL query document parsed into an AST by `gql`.
486
- *
487
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
488
- *
489
489
  * @returns A tuple containing:
490
490
  *
491
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
491
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
492
+ * 2. An object containing helper functions for the query:
493
+ * - `refetch`: A function to re-execute the query
494
+ * - `fetchMore`: A function to fetch more results for pagination
495
+ * - `subscribeToMore`: A function to subscribe to updates
492
496
  *
493
497
  * @example
498
+ *
494
499
  * ```jsx
495
500
  * import { Suspense } from "react";
496
501
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -535,6 +540,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
535
540
  * );
536
541
  * }
537
542
  * ```
543
+ *
544
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
545
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
538
546
  */
539
547
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
540
548
  skip: boolean;
@@ -546,15 +554,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
546
554
  /**
547
555
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
548
556
  *
549
- * @param query - A GraphQL query document parsed into an AST by `gql`.
550
- *
551
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
552
- *
553
557
  * @returns A tuple containing:
554
558
  *
555
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
559
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
560
+ * 2. An object containing helper functions for the query:
561
+ * - `refetch`: A function to re-execute the query
562
+ * - `fetchMore`: A function to fetch more results for pagination
563
+ * - `subscribeToMore`: A function to subscribe to updates
556
564
  *
557
565
  * @example
566
+ *
558
567
  * ```jsx
559
568
  * import { Suspense } from "react";
560
569
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -599,6 +608,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
599
608
  * );
600
609
  * }
601
610
  * ```
611
+ *
612
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
613
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
602
614
  */
603
615
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
604
616
  skip: boolean;
@@ -610,15 +622,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
610
622
  /**
611
623
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
612
624
  *
613
- * @param query - A GraphQL query document parsed into an AST by `gql`.
614
- *
615
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
616
- *
617
625
  * @returns A tuple containing:
618
626
  *
619
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
627
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
628
+ * 2. An object containing helper functions for the query:
629
+ * - `refetch`: A function to re-execute the query
630
+ * - `fetchMore`: A function to fetch more results for pagination
631
+ * - `subscribeToMore`: A function to subscribe to updates
620
632
  *
621
633
  * @example
634
+ *
622
635
  * ```jsx
623
636
  * import { Suspense } from "react";
624
637
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -663,6 +676,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
663
676
  * );
664
677
  * }
665
678
  * ```
679
+ *
680
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
681
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
666
682
  */
667
683
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
668
684
  returnPartialData: false;
@@ -673,15 +689,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
673
689
  /**
674
690
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
675
691
  *
676
- * @param query - A GraphQL query document parsed into an AST by `gql`.
677
- *
678
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
679
- *
680
692
  * @returns A tuple containing:
681
693
  *
682
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
694
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
695
+ * 2. An object containing helper functions for the query:
696
+ * - `refetch`: A function to re-execute the query
697
+ * - `fetchMore`: A function to fetch more results for pagination
698
+ * - `subscribeToMore`: A function to subscribe to updates
683
699
  *
684
700
  * @example
701
+ *
685
702
  * ```jsx
686
703
  * import { Suspense } from "react";
687
704
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -726,6 +743,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
726
743
  * );
727
744
  * }
728
745
  * ```
746
+ *
747
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
748
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
729
749
  */
730
750
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
731
751
  returnPartialData: boolean;
@@ -736,15 +756,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
736
756
  /**
737
757
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
738
758
  *
739
- * @param query - A GraphQL query document parsed into an AST by `gql`.
740
- *
741
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
742
- *
743
759
  * @returns A tuple containing:
744
760
  *
745
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
761
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
762
+ * 2. An object containing helper functions for the query:
763
+ * - `refetch`: A function to re-execute the query
764
+ * - `fetchMore`: A function to fetch more results for pagination
765
+ * - `subscribeToMore`: A function to subscribe to updates
746
766
  *
747
767
  * @example
768
+ *
748
769
  * ```jsx
749
770
  * import { Suspense } from "react";
750
771
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -789,6 +810,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
789
810
  * );
790
811
  * }
791
812
  * ```
813
+ *
814
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
815
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
792
816
  */
793
817
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useBackgroundQuery.Options<NoInfer<TVariables>> & {
794
818
  skip: boolean;
@@ -799,15 +823,16 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
799
823
  /**
800
824
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
801
825
  *
802
- * @param query - A GraphQL query document parsed into an AST by `gql`.
803
- *
804
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
805
- *
806
826
  * @returns A tuple containing:
807
827
  *
808
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
828
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
829
+ * 2. An object containing helper functions for the query:
830
+ * - `refetch`: A function to re-execute the query
831
+ * - `fetchMore`: A function to fetch more results for pagination
832
+ * - `subscribeToMore`: A function to subscribe to updates
809
833
  *
810
834
  * @example
835
+ *
811
836
  * ```jsx
812
837
  * import { Suspense } from "react";
813
838
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -852,20 +877,24 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
852
877
  * );
853
878
  * }
854
879
  * ```
880
+ *
881
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
882
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
855
883
  */
856
884
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken): [undefined, useBackgroundQuery.Result<TData, TVariables>];
857
885
  /**
858
886
  * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
859
887
  *
860
- * @param query - A GraphQL query document parsed into an AST by `gql`.
861
- *
862
- * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
863
- *
864
888
  * @returns A tuple containing:
865
889
  *
866
- * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped. 2. An object containing helper functions for the query: - `refetch`: A function to re-execute the query - `fetchMore`: A function to fetch more results for pagination - `subscribeToMore`: A function to subscribe to updates
890
+ * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.
891
+ * 2. An object containing helper functions for the query:
892
+ * - `refetch`: A function to re-execute the query
893
+ * - `fetchMore`: A function to fetch more results for pagination
894
+ * - `subscribeToMore`: A function to subscribe to updates
867
895
  *
868
896
  * @example
897
+ *
869
898
  * ```jsx
870
899
  * import { Suspense } from "react";
871
900
  * import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
@@ -910,6 +939,9 @@ export declare function useBackgroundQuery<TData = unknown, TVariables extends O
910
939
  * );
911
940
  * }
912
941
  * ```
942
+ *
943
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
944
+ * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.
913
945
  */
914
946
  export declare function useBackgroundQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (useBackgroundQuery.Options<NoInfer<TVariables>> & {
915
947
  returnPartialData: false;
@@ -1 +1 @@
1
- {"version":3,"file":"useFragment.cjs","sources":["../../../../src/react/hooks/useFragment.ts"],"sourcesContent":["import equal from \"@wry/equality\";\nimport * as React from \"react\";\n\nimport type {\n ApolloClient,\n DataValue,\n DocumentNode,\n GetDataState,\n OperationVariables,\n TypedDocumentNode,\n} from \"@apollo/client\";\nimport type {\n Cache,\n MissingTree,\n Reference,\n StoreObject,\n} from \"@apollo/client/cache\";\nimport type { FragmentType, MaybeMasked } from \"@apollo/client/masking\";\nimport type { NoInfer } from \"@apollo/client/utilities/internal\";\n\nimport { useDeepMemo, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useSyncExternalStore } from \"./useSyncExternalStore.js\";\n\nexport declare namespace useFragment {\n import _self = useFragment;\n export interface Options<TData, TVariables extends OperationVariables> {\n /**\n * A GraphQL document created using the `gql` template string tag from\n * `graphql-tag` with one or more fragments which will be used to determine\n * the shape of data to read. If you provide more than one fragment in this\n * document then you must also specify `fragmentName` to select a single.\n */\n fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * The name of the fragment in your GraphQL document to be used. If you do\n * not provide a `fragmentName` and there is only one fragment in your\n * `fragment` document then that fragment will be used.\n */\n fragmentName?: string;\n\n /**\n * Any variables that the GraphQL query may depend on.\n */\n variables?: NoInfer<TVariables>;\n\n /**\n * An object containing a `__typename` and primary key fields (such as `id`) identifying the entity object from which the fragment will be retrieved, or a `{ __ref: \"...\" }` reference, or a `string` ID (uncommon).\n */\n from:\n | StoreObject\n | Reference\n | FragmentType<NoInfer<TData>>\n | string\n | null;\n\n /**\n * Whether to read from optimistic or non-optimistic cache data. If\n * this named option is provided, the optimistic parameter of the\n * readQuery method can be omitted.\n *\n * @defaultValue true\n */\n optimistic?: boolean;\n\n /**\n * The instance of `ApolloClient` to use to look up the fragment.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client?: ApolloClient;\n }\n\n namespace DocumentationTypes {\n namespace useFragment {\n export interface Options<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > extends _self.Options<TData, TVariables> {}\n }\n }\n\n // TODO: Update this to return `null` when there is no data returned from the\n // fragment.\n export type Result<TData> =\n | ({\n /** {@inheritDoc @apollo/client!useFragment.DocumentationTypes.useFragment.Result#complete:member} */\n complete: true;\n /** {@inheritDoc @apollo/client!useFragment.DocumentationTypes.useFragment.Result#missing:member} */\n missing?: never;\n } & GetDataState<MaybeMasked<TData>, \"complete\">)\n | ({\n /** {@inheritDoc @apollo/client!useFragment.DocumentationTypes.useFragment.Result#complete:member} */\n complete: false;\n /** {@inheritDoc @apollo/client!useFragment.DocumentationTypes.useFragment.Result#missing:member} */\n missing?: MissingTree;\n } & GetDataState<MaybeMasked<TData>, \"partial\">);\n\n export namespace DocumentationTypes {\n namespace useFragment {\n export interface Result<TData> {\n data: MaybeMasked<TData> | DataValue.Partial<MaybeMasked<TData>>;\n complete: boolean;\n /**\n * A tree of all `MissingFieldError` messages reported during fragment reading, where the branches of the tree indicate the paths of the errors within the query result.\n */\n missing?: MissingTree;\n }\n }\n }\n export namespace DocumentationTypes {\n /** {@inheritDoc @apollo/client!useFragment:function(1)} */\n export function useFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n fragment,\n from,\n fragmentName,\n variables,\n optimistic,\n client,\n }: useFragment.Options<TData, TVariables>): useFragment.Result<TData>;\n }\n}\n\n/**\n * `useFragment` represents a lightweight live binding into the Apollo Client Cache and enables Apollo Client to broadcast very specific fragment results to individual components. This hook returns an always-up-to-date view of whatever data the cache currently contains for a given fragment. `useFragment` never triggers network requests of its own.\n *\n * Note that the `useQuery` hook remains the primary hook responsible for querying and populating data in the cache ([see the API reference](./hooks#usequery)). As a result, the component reading the fragment data via `useFragment` is still subscribed to all changes in the query data, but receives updates only when that fragment's specific data change.\n *\n * To view a `useFragment` example, see the [Fragments](https://www.apollographql.com/docs/react/data/fragments#usefragment) page.\n */\nexport function useFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(options: useFragment.Options<TData, TVariables>): useFragment.Result<TData> {\n \"use no memo\";\n return wrapHook(\n \"useFragment\",\n // eslint-disable-next-line react-compiler/react-compiler\n useFragment_,\n useApolloClient(options.client)\n )(options);\n}\n\nfunction useFragment_<TData, TVariables extends OperationVariables>(\n options: useFragment.Options<TData, TVariables>\n): useFragment.Result<TData> {\n const client = useApolloClient(options.client);\n const { cache } = client;\n const { from, ...rest } = options;\n\n // We calculate the cache id seperately from `stableOptions` because we don't\n // want changes to non key fields in the `from` property to affect\n // `stableOptions` and retrigger our subscription. If the cache identifier\n // stays the same between renders, we want to reuse the existing subscription.\n const id = React.useMemo(\n () =>\n typeof from === \"string\" ? from\n : from === null ? null\n : cache.identify(from),\n [cache, from]\n );\n\n const stableOptions = useDeepMemo(() => ({ ...rest, from: id! }), [rest, id]);\n\n // Since .next is async, we need to make sure that we\n // get the correct diff on the next render given new diffOptions\n const diff = React.useMemo(() => {\n const { fragment, fragmentName, from, optimistic = true } = stableOptions;\n\n if (from === null) {\n return {\n result: diffToResult({\n result: {},\n complete: false,\n } as Cache.DiffResult<TData>),\n };\n }\n\n const { cache } = client;\n const diff = cache.diff<TData, TVariables>({\n ...stableOptions,\n returnPartialData: true,\n id: from,\n query: cache[\"getFragmentDoc\"](\n client[\"transform\"](fragment),\n fragmentName\n ),\n optimistic,\n });\n\n return {\n result: diffToResult<TData>({\n ...diff,\n result: client[\"queryManager\"].maskFragment({\n fragment,\n fragmentName,\n // TODO: Revert to `diff.result` once `useFragment` supports `null` as\n // valid return value\n data: diff.result === null ? {} : diff.result,\n }) as any,\n }),\n };\n }, [client, stableOptions]);\n\n // Used for both getSnapshot and getServerSnapshot\n const getSnapshot = React.useCallback(() => diff.result, [diff]);\n\n return useSyncExternalStore(\n React.useCallback(\n (forceUpdate) => {\n let lastTimeout = 0;\n\n const subscription =\n stableOptions.from === null ?\n null\n : client.watchFragment(stableOptions).subscribe({\n next: (result) => {\n // Avoid unnecessarily rerendering this hook for the initial result\n // emitted from watchFragment which should be equal to\n // `diff.result`.\n if (equal(result, diff.result)) return;\n diff.result = result;\n // If we get another update before we've re-rendered, bail out of\n // the update and try again. This ensures that the relative timing\n // between useQuery and useFragment stays roughly the same as\n // fixed in https://github.com/apollographql/apollo-client/pull/11083\n clearTimeout(lastTimeout);\n lastTimeout = setTimeout(forceUpdate) as any;\n },\n });\n return () => {\n subscription?.unsubscribe();\n clearTimeout(lastTimeout);\n };\n },\n [client, stableOptions, diff]\n ),\n getSnapshot,\n getSnapshot\n );\n}\n\nfunction diffToResult<TData>(\n diff: Cache.DiffResult<TData>\n): useFragment.Result<TData> {\n const result = {\n data: diff.result,\n complete: !!diff.complete,\n dataState: diff.complete ? \"complete\" : \"partial\",\n } as useFragment.Result<TData>; // TODO: Remove assertion once useFragment returns null\n\n if (diff.missing) {\n result.missing = diff.missing.missing;\n }\n\n return result;\n}\n"],"names":[],"mappings":";;AAyIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAzIA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAmBA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA0C,EAAE,CAA5C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqD;IACrD,CAAgC,EAAE,CAAlC,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;IAEE,CAAF,EAAA,CAAM,CAAN,CAAA,CAAA,CAAU,CAAC,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,EAAE;QAChB,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAU,CAAC,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAqB,CAArB,CAAA,CAAA,CAAyB,CAAC,CAA1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiC,CAAC,CAAlC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyC;IACvC;IAEA,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAe;AACf;"}
1
+ {"version":3,"file":"useFragment.cjs","sources":["../../../../src/react/hooks/useFragment.ts"],"sourcesContent":["import equal from \"@wry/equality\";\nimport * as React from \"react\";\n\nimport type {\n ApolloClient,\n DataValue,\n DocumentNode,\n GetDataState,\n OperationVariables,\n TypedDocumentNode,\n} from \"@apollo/client\";\nimport type {\n Cache,\n MissingTree,\n Reference,\n StoreObject,\n} from \"@apollo/client/cache\";\nimport type { FragmentType, MaybeMasked } from \"@apollo/client/masking\";\nimport type { NoInfer } from \"@apollo/client/utilities/internal\";\n\nimport { useDeepMemo, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useSyncExternalStore } from \"./useSyncExternalStore.js\";\n\nexport declare namespace useFragment {\n import _self = useFragment;\n export interface Options<TData, TVariables extends OperationVariables> {\n /**\n * A GraphQL document created using the `gql` template string tag from\n * `graphql-tag` with one or more fragments which will be used to determine\n * the shape of data to read. If you provide more than one fragment in this\n * document then you must also specify `fragmentName` to select a single.\n */\n fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;\n\n /**\n * The name of the fragment in your GraphQL document to be used. If you do\n * not provide a `fragmentName` and there is only one fragment in your\n * `fragment` document then that fragment will be used.\n */\n fragmentName?: string;\n\n /**\n * Any variables that the GraphQL query may depend on.\n */\n variables?: NoInfer<TVariables>;\n\n /**\n * An object containing a `__typename` and primary key fields (such as `id`) identifying the entity object from which the fragment will be retrieved, or a `{ __ref: \"...\" }` reference, or a `string` ID (uncommon).\n */\n from:\n | StoreObject\n | Reference\n | FragmentType<NoInfer<TData>>\n | string\n | null;\n\n /**\n * Whether to read from optimistic or non-optimistic cache data. If\n * this named option is provided, the optimistic parameter of the\n * readQuery method can be omitted.\n *\n * @defaultValue true\n */\n optimistic?: boolean;\n\n /**\n * The instance of `ApolloClient` to use to look up the fragment.\n *\n * By default, the instance that's passed down via context is used, but you\n * can provide a different instance here.\n *\n * @docGroup 1. Operation options\n */\n client?: ApolloClient;\n }\n\n namespace DocumentationTypes {\n namespace useFragment {\n export interface Options<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > extends _self.Options<TData, TVariables> {}\n }\n }\n\n // TODO: Update this to return `null` when there is no data returned from the\n // fragment.\n export type Result<TData> =\n | ({\n /** {@inheritDoc @apollo/client/react!useFragment.DocumentationTypes.useFragment.Result#complete:member} */\n complete: true;\n /** {@inheritDoc @apollo/client/react!useFragment.DocumentationTypes.useFragment.Result#missing:member} */\n missing?: never;\n } & GetDataState<MaybeMasked<TData>, \"complete\">)\n | ({\n /** {@inheritDoc @apollo/client/react!useFragment.DocumentationTypes.useFragment.Result#complete:member} */\n complete: false;\n /** {@inheritDoc @apollo/client/react!useFragment.DocumentationTypes.useFragment.Result#missing:member} */\n missing?: MissingTree;\n } & GetDataState<MaybeMasked<TData>, \"partial\">);\n\n export namespace DocumentationTypes {\n namespace useFragment {\n export interface Result<TData> {\n data: MaybeMasked<TData> | DataValue.Partial<MaybeMasked<TData>>;\n complete: boolean;\n /**\n * A tree of all `MissingFieldError` messages reported during fragment reading, where the branches of the tree indicate the paths of the errors within the query result.\n */\n missing?: MissingTree;\n }\n }\n }\n export namespace DocumentationTypes {\n /** {@inheritDoc @apollo/client/react!useFragment:function(1)} */\n export function useFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >({\n fragment,\n from,\n fragmentName,\n variables,\n optimistic,\n client,\n }: useFragment.Options<TData, TVariables>): useFragment.Result<TData>;\n }\n}\n\n/**\n * `useFragment` represents a lightweight live binding into the Apollo Client Cache and enables Apollo Client to broadcast very specific fragment results to individual components. This hook returns an always-up-to-date view of whatever data the cache currently contains for a given fragment. `useFragment` never triggers network requests of its own.\n *\n * Note that the `useQuery` hook remains the primary hook responsible for querying and populating data in the cache ([see the API reference](./hooks#usequery)). As a result, the component reading the fragment data via `useFragment` is still subscribed to all changes in the query data, but receives updates only when that fragment's specific data change.\n *\n * To view a `useFragment` example, see the [Fragments](https://www.apollographql.com/docs/react/data/fragments#usefragment) page.\n */\nexport function useFragment<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n>(options: useFragment.Options<TData, TVariables>): useFragment.Result<TData> {\n \"use no memo\";\n return wrapHook(\n \"useFragment\",\n // eslint-disable-next-line react-compiler/react-compiler\n useFragment_,\n useApolloClient(options.client)\n )(options);\n}\n\nfunction useFragment_<TData, TVariables extends OperationVariables>(\n options: useFragment.Options<TData, TVariables>\n): useFragment.Result<TData> {\n const client = useApolloClient(options.client);\n const { cache } = client;\n const { from, ...rest } = options;\n\n // We calculate the cache id seperately from `stableOptions` because we don't\n // want changes to non key fields in the `from` property to affect\n // `stableOptions` and retrigger our subscription. If the cache identifier\n // stays the same between renders, we want to reuse the existing subscription.\n const id = React.useMemo(\n () =>\n typeof from === \"string\" ? from\n : from === null ? null\n : cache.identify(from),\n [cache, from]\n );\n\n const stableOptions = useDeepMemo(() => ({ ...rest, from: id! }), [rest, id]);\n\n // Since .next is async, we need to make sure that we\n // get the correct diff on the next render given new diffOptions\n const diff = React.useMemo(() => {\n const { fragment, fragmentName, from, optimistic = true } = stableOptions;\n\n if (from === null) {\n return {\n result: diffToResult({\n result: {},\n complete: false,\n } as Cache.DiffResult<TData>),\n };\n }\n\n const { cache } = client;\n const diff = cache.diff<TData, TVariables>({\n ...stableOptions,\n returnPartialData: true,\n id: from,\n query: cache[\"getFragmentDoc\"](\n client[\"transform\"](fragment),\n fragmentName\n ),\n optimistic,\n });\n\n return {\n result: diffToResult<TData>({\n ...diff,\n result: client[\"queryManager\"].maskFragment({\n fragment,\n fragmentName,\n // TODO: Revert to `diff.result` once `useFragment` supports `null` as\n // valid return value\n data: diff.result === null ? {} : diff.result,\n }) as any,\n }),\n };\n }, [client, stableOptions]);\n\n // Used for both getSnapshot and getServerSnapshot\n const getSnapshot = React.useCallback(() => diff.result, [diff]);\n\n return useSyncExternalStore(\n React.useCallback(\n (forceUpdate) => {\n let lastTimeout = 0;\n\n const subscription =\n stableOptions.from === null ?\n null\n : client.watchFragment(stableOptions).subscribe({\n next: (result) => {\n // Avoid unnecessarily rerendering this hook for the initial result\n // emitted from watchFragment which should be equal to\n // `diff.result`.\n if (equal(result, diff.result)) return;\n diff.result = result;\n // If we get another update before we've re-rendered, bail out of\n // the update and try again. This ensures that the relative timing\n // between useQuery and useFragment stays roughly the same as\n // fixed in https://github.com/apollographql/apollo-client/pull/11083\n clearTimeout(lastTimeout);\n lastTimeout = setTimeout(forceUpdate) as any;\n },\n });\n return () => {\n subscription?.unsubscribe();\n clearTimeout(lastTimeout);\n };\n },\n [client, stableOptions, diff]\n ),\n getSnapshot,\n getSnapshot\n );\n}\n\nfunction diffToResult<TData>(\n diff: Cache.DiffResult<TData>\n): useFragment.Result<TData> {\n const result = {\n data: diff.result,\n complete: !!diff.complete,\n dataState: diff.complete ? \"complete\" : \"partial\",\n } as useFragment.Result<TData>; // TODO: Remove assertion once useFragment returns null\n\n if (diff.missing) {\n result.missing = diff.missing.missing;\n }\n\n return result;\n}\n"],"names":[],"mappings":";;AAyIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;AAzIA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAmBA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CA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,EAAE,CAAf,CAAA,CAAA,CAAmB,CAAC,CAApB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA6B,EAAE,CAA/B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA0C,EAAE,CAA5C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqD;IACrD,CAAgC,EAAE,CAAlC,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;IAEE,CAAF,EAAA,CAAM,CAAN,CAAA,CAAA,CAAU,CAAC,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,EAAE;QAChB,CAAJ,CAAA,CAAA,CAAA,CAAA,CAAU,CAAC,CAAX,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAqB,CAArB,CAAA,CAAA,CAAyB,CAAC,CAA1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiC,CAAC,CAAlC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyC;IACvC;IAEA,CAAF,CAAA,CAAA,CAAA,CAAA,EAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAe;AACf;"}
@@ -52,7 +52,7 @@ export declare namespace useFragment {
52
52
  }
53
53
  type Result<TData> = ({
54
54
  /**
55
- *
55
+ *
56
56
  */
57
57
  complete: true;
58
58
  /**
@@ -61,7 +61,7 @@ export declare namespace useFragment {
61
61
  missing?: never;
62
62
  } & GetDataState<MaybeMasked<TData>, "complete">) | ({
63
63
  /**
64
- *
64
+ *
65
65
  */
66
66
  complete: false;
67
67
  /**