@apollo/client 3.8.0 → 3.8.2

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 (443) hide show
  1. package/apollo-client.cjs +715 -587
  2. package/apollo-client.cjs.map +1 -1
  3. package/apollo-client.min.cjs +1 -1
  4. package/cache/cache.cjs +253 -191
  5. package/cache/cache.cjs.map +1 -1
  6. package/cache/cache.cjs.native.js +253 -191
  7. package/cache/core/cache.d.ts +4 -4
  8. package/cache/core/cache.d.ts.map +1 -1
  9. package/cache/core/cache.js +10 -7
  10. package/cache/core/cache.js.map +1 -1
  11. package/cache/core/types/Cache.d.ts +3 -3
  12. package/cache/core/types/Cache.d.ts.map +1 -1
  13. package/cache/core/types/Cache.js +0 -1
  14. package/cache/core/types/Cache.js.map +1 -1
  15. package/cache/core/types/DataProxy.d.ts +6 -6
  16. package/cache/core/types/DataProxy.d.ts.map +1 -1
  17. package/cache/core/types/DataProxy.js.map +1 -1
  18. package/cache/core/types/common.d.ts +3 -3
  19. package/cache/core/types/common.d.ts.map +1 -1
  20. package/cache/core/types/common.js.map +1 -1
  21. package/cache/index.d.ts +20 -20
  22. package/cache/index.d.ts.map +1 -1
  23. package/cache/index.js +13 -13
  24. package/cache/index.js.map +1 -1
  25. package/cache/inmemory/entityStore.d.ts +6 -6
  26. package/cache/inmemory/entityStore.d.ts.map +1 -1
  27. package/cache/inmemory/entityStore.js +38 -30
  28. package/cache/inmemory/entityStore.js.map +1 -1
  29. package/cache/inmemory/fixPolyfills.native.d.ts.map +1 -1
  30. package/cache/inmemory/fixPolyfills.native.js +10 -9
  31. package/cache/inmemory/fixPolyfills.native.js.map +1 -1
  32. package/cache/inmemory/fragmentRegistry.d.ts.map +1 -1
  33. package/cache/inmemory/fragmentRegistry.js +6 -4
  34. package/cache/inmemory/fragmentRegistry.js.map +1 -1
  35. package/cache/inmemory/helpers.d.ts +6 -6
  36. package/cache/inmemory/helpers.d.ts.map +1 -1
  37. package/cache/inmemory/helpers.js +16 -14
  38. package/cache/inmemory/helpers.js.map +1 -1
  39. package/cache/inmemory/inMemoryCache.d.ts +9 -9
  40. package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
  41. package/cache/inmemory/inMemoryCache.js +29 -33
  42. package/cache/inmemory/inMemoryCache.js.map +1 -1
  43. package/cache/inmemory/key-extractor.d.ts.map +1 -1
  44. package/cache/inmemory/key-extractor.js +55 -49
  45. package/cache/inmemory/key-extractor.js.map +1 -1
  46. package/cache/inmemory/object-canon.d.ts.map +1 -1
  47. package/cache/inmemory/object-canon.js +5 -5
  48. package/cache/inmemory/object-canon.js.map +1 -1
  49. package/cache/inmemory/policies.d.ts +6 -6
  50. package/cache/inmemory/policies.d.ts.map +1 -1
  51. package/cache/inmemory/policies.js +74 -45
  52. package/cache/inmemory/policies.js.map +1 -1
  53. package/cache/inmemory/reactiveVars.d.ts +1 -1
  54. package/cache/inmemory/reactiveVars.d.ts.map +1 -1
  55. package/cache/inmemory/reactiveVars.js +5 -5
  56. package/cache/inmemory/reactiveVars.js.map +1 -1
  57. package/cache/inmemory/readFromStore.d.ts +7 -7
  58. package/cache/inmemory/readFromStore.d.ts.map +1 -1
  59. package/cache/inmemory/readFromStore.js +21 -17
  60. package/cache/inmemory/readFromStore.js.map +1 -1
  61. package/cache/inmemory/types.d.ts +7 -7
  62. package/cache/inmemory/types.d.ts.map +1 -1
  63. package/cache/inmemory/types.js +0 -2
  64. package/cache/inmemory/types.js.map +1 -1
  65. package/cache/inmemory/writeToStore.d.ts +7 -7
  66. package/cache/inmemory/writeToStore.d.ts.map +1 -1
  67. package/cache/inmemory/writeToStore.js +40 -30
  68. package/cache/inmemory/writeToStore.js.map +1 -1
  69. package/config/jest/setup.d.ts +2 -2
  70. package/config/jest/setup.js +5 -5
  71. package/config/jest/setup.js.map +1 -1
  72. package/core/ApolloClient.d.ts +11 -11
  73. package/core/ApolloClient.d.ts.map +1 -1
  74. package/core/ApolloClient.js +64 -50
  75. package/core/ApolloClient.js.map +1 -1
  76. package/core/LocalState.d.ts +6 -6
  77. package/core/LocalState.d.ts.map +1 -1
  78. package/core/LocalState.js +17 -16
  79. package/core/LocalState.js.map +1 -1
  80. package/core/ObservableQuery.d.ts +12 -10
  81. package/core/ObservableQuery.d.ts.map +1 -1
  82. package/core/ObservableQuery.js +57 -38
  83. package/core/ObservableQuery.js.map +1 -1
  84. package/core/QueryInfo.d.ts +11 -11
  85. package/core/QueryInfo.d.ts.map +1 -1
  86. package/core/QueryInfo.js +28 -34
  87. package/core/QueryInfo.js.map +1 -1
  88. package/core/QueryManager.d.ts +10 -10
  89. package/core/QueryManager.d.ts.map +1 -1
  90. package/core/QueryManager.js +117 -93
  91. package/core/QueryManager.js.map +1 -1
  92. package/core/core.cjs +255 -199
  93. package/core/core.cjs.map +1 -1
  94. package/core/core.cjs.native.js +255 -199
  95. package/core/networkStatus.js.map +1 -1
  96. package/core/types.d.ts +13 -13
  97. package/core/types.d.ts.map +1 -1
  98. package/core/types.js +0 -1
  99. package/core/types.js.map +1 -1
  100. package/core/watchQueryOptions.d.ts +11 -11
  101. package/core/watchQueryOptions.d.ts.map +1 -1
  102. package/core/watchQueryOptions.js.map +1 -1
  103. package/dev/dev.cjs +44 -40
  104. package/dev/dev.cjs.map +1 -1
  105. package/dev/dev.cjs.native.js +44 -40
  106. package/errors/errors.cjs +7 -5
  107. package/errors/errors.cjs.map +1 -1
  108. package/errors/errors.cjs.native.js +7 -5
  109. package/errors/index.d.ts +4 -4
  110. package/errors/index.d.ts.map +1 -1
  111. package/errors/index.js +9 -7
  112. package/errors/index.js.map +1 -1
  113. package/index.d.ts +2 -2
  114. package/index.js +2 -2
  115. package/index.js.map +1 -1
  116. package/invariantErrorCodes.d.ts.map +1 -1
  117. package/invariantErrorCodes.js +36 -36
  118. package/invariantErrorCodes.js.map +1 -1
  119. package/link/batch/batch.cjs +4 -4
  120. package/link/batch/batch.cjs.map +1 -1
  121. package/link/batch/batch.cjs.native.js +4 -4
  122. package/link/batch/batchLink.d.ts +6 -6
  123. package/link/batch/batchLink.d.ts.map +1 -1
  124. package/link/batch/batchLink.js +4 -4
  125. package/link/batch/batchLink.js.map +1 -1
  126. package/link/batch/batching.d.ts +2 -2
  127. package/link/batch/batching.d.ts.map +1 -1
  128. package/link/batch/batching.js +4 -4
  129. package/link/batch/batching.js.map +1 -1
  130. package/link/batch/index.d.ts +1 -1
  131. package/link/batch/index.js +1 -1
  132. package/link/batch/index.js.map +1 -1
  133. package/link/batch-http/batch-http.cjs +13 -11
  134. package/link/batch-http/batch-http.cjs.map +1 -1
  135. package/link/batch-http/batch-http.cjs.native.js +13 -11
  136. package/link/batch-http/batchHttpLink.d.ts +6 -6
  137. package/link/batch-http/batchHttpLink.d.ts.map +1 -1
  138. package/link/batch-http/batchHttpLink.js +17 -15
  139. package/link/batch-http/batchHttpLink.js.map +1 -1
  140. package/link/batch-http/index.d.ts +1 -1
  141. package/link/batch-http/index.js +1 -1
  142. package/link/batch-http/index.js.map +1 -1
  143. package/link/context/context.cjs.map +1 -1
  144. package/link/context/index.d.ts +3 -3
  145. package/link/context/index.js +2 -2
  146. package/link/context/index.js.map +1 -1
  147. package/link/core/ApolloLink.d.ts +3 -3
  148. package/link/core/ApolloLink.js +4 -4
  149. package/link/core/ApolloLink.js.map +1 -1
  150. package/link/core/concat.d.ts +1 -1
  151. package/link/core/concat.js +1 -1
  152. package/link/core/concat.js.map +1 -1
  153. package/link/core/core.cjs +1 -1
  154. package/link/core/core.cjs.map +1 -1
  155. package/link/core/core.cjs.native.js +1 -1
  156. package/link/core/empty.d.ts +1 -1
  157. package/link/core/empty.js +1 -1
  158. package/link/core/empty.js.map +1 -1
  159. package/link/core/execute.d.ts +1 -1
  160. package/link/core/execute.js +1 -1
  161. package/link/core/execute.js.map +1 -1
  162. package/link/core/from.d.ts +1 -1
  163. package/link/core/from.js +1 -1
  164. package/link/core/from.js.map +1 -1
  165. package/link/core/index.d.ts +8 -8
  166. package/link/core/index.js +8 -8
  167. package/link/core/index.js.map +1 -1
  168. package/link/core/split.d.ts +1 -1
  169. package/link/core/split.js +1 -1
  170. package/link/core/split.js.map +1 -1
  171. package/link/core/types.js.map +1 -1
  172. package/link/error/error.cjs.map +1 -1
  173. package/link/error/index.d.ts +5 -5
  174. package/link/error/index.js +2 -2
  175. package/link/error/index.js.map +1 -1
  176. package/link/http/HttpLink.d.ts +3 -3
  177. package/link/http/HttpLink.js +2 -2
  178. package/link/http/HttpLink.js.map +1 -1
  179. package/link/http/checkFetcher.d.ts +1 -1
  180. package/link/http/checkFetcher.d.ts.map +1 -1
  181. package/link/http/checkFetcher.js +2 -2
  182. package/link/http/checkFetcher.js.map +1 -1
  183. package/link/http/createHttpLink.d.ts +2 -2
  184. package/link/http/createHttpLink.d.ts.map +1 -1
  185. package/link/http/createHttpLink.js +27 -26
  186. package/link/http/createHttpLink.js.map +1 -1
  187. package/link/http/createSignalIfSupported.js +1 -1
  188. package/link/http/createSignalIfSupported.js.map +1 -1
  189. package/link/http/http.cjs +64 -41
  190. package/link/http/http.cjs.map +1 -1
  191. package/link/http/http.cjs.native.js +64 -41
  192. package/link/http/index.d.ts +13 -13
  193. package/link/http/index.js +10 -10
  194. package/link/http/index.js.map +1 -1
  195. package/link/http/iterators/nodeStream.d.ts.map +1 -1
  196. package/link/http/iterators/nodeStream.js.map +1 -1
  197. package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
  198. package/link/http/parseAndCheckHttpResponse.js +2 -2
  199. package/link/http/parseAndCheckHttpResponse.js.map +1 -1
  200. package/link/http/responseIterator.d.ts.map +1 -1
  201. package/link/http/responseIterator.js +20 -1
  202. package/link/http/responseIterator.js.map +1 -1
  203. package/link/http/rewriteURIForGET.d.ts +1 -1
  204. package/link/http/rewriteURIForGET.js +12 -12
  205. package/link/http/rewriteURIForGET.js.map +1 -1
  206. package/link/http/selectHttpOptionsAndBody.d.ts +5 -5
  207. package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
  208. package/link/http/selectHttpOptionsAndBody.js +8 -7
  209. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  210. package/link/http/selectURI.d.ts +1 -1
  211. package/link/http/selectURI.js +2 -2
  212. package/link/http/selectURI.js.map +1 -1
  213. package/link/http/serializeFetchParameter.d.ts +1 -1
  214. package/link/http/serializeFetchParameter.js +1 -1
  215. package/link/http/serializeFetchParameter.js.map +1 -1
  216. package/link/persisted-queries/index.d.ts +4 -4
  217. package/link/persisted-queries/index.d.ts.map +1 -1
  218. package/link/persisted-queries/index.js +26 -25
  219. package/link/persisted-queries/index.js.map +1 -1
  220. package/link/persisted-queries/persisted-queries.cjs +22 -17
  221. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  222. package/link/persisted-queries/persisted-queries.cjs.native.js +22 -17
  223. package/link/retry/delayFunction.d.ts +1 -1
  224. package/link/retry/delayFunction.js.map +1 -1
  225. package/link/retry/index.d.ts +1 -1
  226. package/link/retry/index.js +1 -1
  227. package/link/retry/index.js.map +1 -1
  228. package/link/retry/retry.cjs +2 -2
  229. package/link/retry/retry.cjs.map +1 -1
  230. package/link/retry/retry.cjs.native.js +2 -2
  231. package/link/retry/retryFunction.d.ts +1 -1
  232. package/link/retry/retryFunction.js.map +1 -1
  233. package/link/retry/retryLink.d.ts +5 -5
  234. package/link/retry/retryLink.d.ts.map +1 -1
  235. package/link/retry/retryLink.js +6 -6
  236. package/link/retry/retryLink.js.map +1 -1
  237. package/link/schema/index.d.ts +4 -4
  238. package/link/schema/index.d.ts.map +1 -1
  239. package/link/schema/index.js +13 -8
  240. package/link/schema/index.js.map +1 -1
  241. package/link/schema/schema.cjs +10 -5
  242. package/link/schema/schema.cjs.map +1 -1
  243. package/link/schema/schema.cjs.native.js +10 -5
  244. package/link/subscriptions/index.js +1 -1
  245. package/link/subscriptions/index.js.map +1 -1
  246. package/link/subscriptions/subscriptions.cjs.map +1 -1
  247. package/link/utils/createOperation.d.ts +1 -1
  248. package/link/utils/createOperation.js +3 -3
  249. package/link/utils/createOperation.js.map +1 -1
  250. package/link/utils/filterOperationVariables.d.ts +1 -1
  251. package/link/utils/filterOperationVariables.js +2 -2
  252. package/link/utils/filterOperationVariables.js.map +1 -1
  253. package/link/utils/fromError.d.ts +1 -1
  254. package/link/utils/fromError.js +1 -1
  255. package/link/utils/fromError.js.map +1 -1
  256. package/link/utils/fromPromise.d.ts +1 -1
  257. package/link/utils/fromPromise.js +1 -1
  258. package/link/utils/fromPromise.js.map +1 -1
  259. package/link/utils/index.d.ts +10 -10
  260. package/link/utils/index.js +9 -9
  261. package/link/utils/index.js.map +1 -1
  262. package/link/utils/throwServerError.js +1 -1
  263. package/link/utils/throwServerError.js.map +1 -1
  264. package/link/utils/toPromise.d.ts +1 -1
  265. package/link/utils/toPromise.js +1 -1
  266. package/link/utils/toPromise.js.map +1 -1
  267. package/link/utils/transformOperation.d.ts +1 -1
  268. package/link/utils/transformOperation.js +3 -3
  269. package/link/utils/transformOperation.js.map +1 -1
  270. package/link/utils/utils.cjs +12 -12
  271. package/link/utils/utils.cjs.map +1 -1
  272. package/link/utils/utils.cjs.native.js +12 -12
  273. package/link/utils/validateOperation.d.ts +1 -1
  274. package/link/utils/validateOperation.js +6 -6
  275. package/link/utils/validateOperation.js.map +1 -1
  276. package/link/ws/index.d.ts +5 -5
  277. package/link/ws/index.js +2 -2
  278. package/link/ws/index.js.map +1 -1
  279. package/link/ws/ws.cjs.map +1 -1
  280. package/package.json +27 -27
  281. package/react/cache/QueryReference.d.ts +1 -1
  282. package/react/cache/QueryReference.d.ts.map +1 -1
  283. package/react/cache/QueryReference.js +2 -0
  284. package/react/cache/QueryReference.js.map +1 -1
  285. package/react/hooks/constants.js +1 -1
  286. package/react/hooks/constants.js.map +1 -1
  287. package/react/hooks/hooks.cjs +10 -21
  288. package/react/hooks/hooks.cjs.map +1 -1
  289. package/react/hooks/hooks.cjs.native.js +10 -21
  290. package/react/hooks/useBackgroundQuery.d.ts +1 -1
  291. package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
  292. package/react/hooks/useBackgroundQuery.js.map +1 -1
  293. package/react/hooks/useQuery.d.ts.map +1 -1
  294. package/react/hooks/useQuery.js +1 -8
  295. package/react/hooks/useQuery.js.map +1 -1
  296. package/react/hooks/useReactiveVar.d.ts.map +1 -1
  297. package/react/hooks/useReactiveVar.js +7 -12
  298. package/react/hooks/useReactiveVar.js.map +1 -1
  299. package/react/hooks/useReadQuery.d.ts +1 -1
  300. package/react/hooks/useReadQuery.d.ts.map +1 -1
  301. package/react/hooks/useReadQuery.js +1 -1
  302. package/react/hooks/useReadQuery.js.map +1 -1
  303. package/react/hooks/useSuspenseQuery.d.ts +1 -1
  304. package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
  305. package/react/hooks/useSuspenseQuery.js.map +1 -1
  306. package/react/react.cjs +2 -0
  307. package/react/react.cjs.map +1 -1
  308. package/react/react.cjs.native.js +2 -0
  309. package/react/types/types.js.map +1 -1
  310. package/testing/core/core.cjs +37 -28
  311. package/testing/core/core.cjs.map +1 -1
  312. package/testing/core/core.cjs.native.js +37 -28
  313. package/testing/core/itAsync.d.ts.map +1 -1
  314. package/testing/core/itAsync.js +8 -4
  315. package/testing/core/itAsync.js.map +1 -1
  316. package/testing/core/mocking/mockClient.d.ts +3 -3
  317. package/testing/core/mocking/mockClient.d.ts.map +1 -1
  318. package/testing/core/mocking/mockClient.js +6 -4
  319. package/testing/core/mocking/mockClient.js.map +1 -1
  320. package/testing/core/mocking/mockFetch.d.ts +1 -1
  321. package/testing/core/mocking/mockFetch.d.ts.map +1 -1
  322. package/testing/core/mocking/mockFetch.js +3 -3
  323. package/testing/core/mocking/mockFetch.js.map +1 -1
  324. package/testing/core/mocking/mockLink.d.ts +3 -3
  325. package/testing/core/mocking/mockLink.d.ts.map +1 -1
  326. package/testing/core/mocking/mockLink.js +24 -23
  327. package/testing/core/mocking/mockLink.js.map +1 -1
  328. package/testing/core/mocking/mockQueryManager.d.ts +2 -2
  329. package/testing/core/mocking/mockQueryManager.js +3 -3
  330. package/testing/core/mocking/mockQueryManager.js.map +1 -1
  331. package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
  332. package/testing/core/mocking/mockSubscriptionLink.js +4 -4
  333. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
  334. package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
  335. package/testing/core/mocking/mockWatchQuery.js +2 -2
  336. package/testing/core/mocking/mockWatchQuery.js.map +1 -1
  337. package/testing/core/observableToPromise.d.ts +3 -3
  338. package/testing/core/observableToPromise.d.ts.map +1 -1
  339. package/testing/core/observableToPromise.js +8 -4
  340. package/testing/core/observableToPromise.js.map +1 -1
  341. package/testing/core/subscribeAndCount.d.ts +1 -1
  342. package/testing/core/subscribeAndCount.d.ts.map +1 -1
  343. package/testing/core/subscribeAndCount.js +5 -3
  344. package/testing/core/subscribeAndCount.js.map +1 -1
  345. package/testing/core/wait.js.map +1 -1
  346. package/testing/core/withConsoleSpy.d.ts.map +1 -1
  347. package/testing/core/withConsoleSpy.js.map +1 -1
  348. package/testing/core/wrap.d.ts.map +1 -1
  349. package/testing/core/wrap.js +14 -12
  350. package/testing/core/wrap.js.map +1 -1
  351. package/testing/index.d.ts +4 -4
  352. package/testing/index.js +3 -3
  353. package/testing/index.js.map +1 -1
  354. package/testing/react/MockedProvider.d.ts +7 -7
  355. package/testing/react/MockedProvider.d.ts.map +1 -1
  356. package/testing/react/MockedProvider.js +10 -11
  357. package/testing/react/MockedProvider.js.map +1 -1
  358. package/testing/testing.cjs +3 -5
  359. package/testing/testing.cjs.map +1 -1
  360. package/testing/testing.cjs.native.js +3 -5
  361. package/utilities/common/canUse.d.ts.map +1 -1
  362. package/utilities/common/canUse.js +4 -5
  363. package/utilities/common/canUse.js.map +1 -1
  364. package/utilities/common/cloneDeep.js +2 -2
  365. package/utilities/common/cloneDeep.js.map +1 -1
  366. package/utilities/common/compact.d.ts +1 -1
  367. package/utilities/common/compact.js.map +1 -1
  368. package/utilities/common/filterInPlace.js.map +1 -1
  369. package/utilities/common/maybeDeepFreeze.js +1 -1
  370. package/utilities/common/maybeDeepFreeze.js.map +1 -1
  371. package/utilities/common/mergeDeep.d.ts.map +1 -1
  372. package/utilities/common/mergeDeep.js +3 -1
  373. package/utilities/common/mergeDeep.js.map +1 -1
  374. package/utilities/common/mergeOptions.d.ts.map +1 -1
  375. package/utilities/common/mergeOptions.js.map +1 -1
  376. package/utilities/common/objects.js +2 -2
  377. package/utilities/common/objects.js.map +1 -1
  378. package/utilities/common/stringifyForDisplay.d.ts.map +1 -1
  379. package/utilities/common/stringifyForDisplay.js +3 -1
  380. package/utilities/common/stringifyForDisplay.js.map +1 -1
  381. package/utilities/globals/global.d.ts.map +1 -1
  382. package/utilities/globals/global.js +3 -1
  383. package/utilities/globals/global.js.map +1 -1
  384. package/utilities/globals/globals.cjs +8 -4
  385. package/utilities/globals/globals.cjs.map +1 -1
  386. package/utilities/globals/globals.cjs.native.js +8 -4
  387. package/utilities/globals/index.d.ts.map +1 -1
  388. package/utilities/globals/index.js +1 -1
  389. package/utilities/globals/index.js.map +1 -1
  390. package/utilities/globals/invariantWrappers.js +1 -1
  391. package/utilities/globals/invariantWrappers.js.map +1 -1
  392. package/utilities/globals/maybe.d.ts.map +1 -1
  393. package/utilities/globals/maybe.js.map +1 -1
  394. package/utilities/graphql/directives.d.ts +1 -1
  395. package/utilities/graphql/directives.d.ts.map +1 -1
  396. package/utilities/graphql/directives.js +17 -13
  397. package/utilities/graphql/directives.js.map +1 -1
  398. package/utilities/graphql/fragments.d.ts +1 -1
  399. package/utilities/graphql/fragments.d.ts.map +1 -1
  400. package/utilities/graphql/fragments.js +12 -12
  401. package/utilities/graphql/fragments.js.map +1 -1
  402. package/utilities/graphql/getFromAST.d.ts +1 -1
  403. package/utilities/graphql/getFromAST.js +16 -16
  404. package/utilities/graphql/getFromAST.js.map +1 -1
  405. package/utilities/graphql/storeUtils.d.ts +2 -2
  406. package/utilities/graphql/storeUtils.d.ts.map +1 -1
  407. package/utilities/graphql/storeUtils.js +36 -34
  408. package/utilities/graphql/storeUtils.js.map +1 -1
  409. package/utilities/graphql/transform.d.ts +1 -1
  410. package/utilities/graphql/transform.d.ts.map +1 -1
  411. package/utilities/graphql/transform.js +48 -32
  412. package/utilities/graphql/transform.js.map +1 -1
  413. package/utilities/index.d.ts +0 -1
  414. package/utilities/index.d.ts.map +1 -1
  415. package/utilities/index.js +0 -1
  416. package/utilities/index.js.map +1 -1
  417. package/utilities/observables/Concast.d.ts.map +1 -1
  418. package/utilities/observables/Concast.js +5 -9
  419. package/utilities/observables/Concast.js.map +1 -1
  420. package/utilities/observables/Observable.d.ts +4 -4
  421. package/utilities/observables/Observable.d.ts.map +1 -1
  422. package/utilities/observables/Observable.js +6 -4
  423. package/utilities/observables/Observable.js.map +1 -1
  424. package/utilities/observables/asyncMap.d.ts.map +1 -1
  425. package/utilities/observables/asyncMap.js +5 -2
  426. package/utilities/observables/asyncMap.js.map +1 -1
  427. package/utilities/observables/iteration.js.map +1 -1
  428. package/utilities/policies/pagination.d.ts +1 -1
  429. package/utilities/policies/pagination.d.ts.map +1 -1
  430. package/utilities/policies/pagination.js +9 -7
  431. package/utilities/policies/pagination.js.map +1 -1
  432. package/utilities/types/IsStrictlyAny.d.ts +2 -2
  433. package/utilities/types/IsStrictlyAny.d.ts.map +1 -1
  434. package/utilities/types/IsStrictlyAny.js.map +1 -1
  435. package/utilities/utilities.cjs +147 -147
  436. package/utilities/utilities.cjs.map +1 -1
  437. package/utilities/utilities.cjs.native.js +147 -147
  438. package/version.js +1 -1
  439. package/version.js.map +1 -1
  440. package/utilities/common/responseIterator.d.ts +0 -10
  441. package/utilities/common/responseIterator.d.ts.map +0 -1
  442. package/utilities/common/responseIterator.js +0 -21
  443. package/utilities/common/responseIterator.js.map +0 -1
@@ -17,14 +17,15 @@ function shouldInclude(_a, variables) {
17
17
  return getInclusionDirectives(directives).every(function (_a) {
18
18
  var directive = _a.directive, ifArgument = _a.ifArgument;
19
19
  var evaledValue = false;
20
- if (ifArgument.value.kind === 'Variable') {
21
- evaledValue = variables && variables[ifArgument.value.name.value];
20
+ if (ifArgument.value.kind === "Variable") {
21
+ evaledValue =
22
+ variables && variables[ifArgument.value.name.value];
22
23
  globals.invariant(evaledValue !== void 0, 64, directive.name.value);
23
24
  }
24
25
  else {
25
26
  evaledValue = ifArgument.value.value;
26
27
  }
27
- return directive.name.value === 'skip' ? !evaledValue : evaledValue;
28
+ return directive.name.value === "skip" ? !evaledValue : evaledValue;
28
29
  });
29
30
  }
30
31
  function getDirectiveNames(root) {
@@ -36,15 +37,18 @@ function getDirectiveNames(root) {
36
37
  });
37
38
  return names;
38
39
  }
39
- var hasAnyDirectives = function (names, root) { return hasDirectives(names, root, false); };
40
- var hasAllDirectives = function (names, root) { return hasDirectives(names, root, true); };
40
+ var hasAnyDirectives = function (names, root) {
41
+ return hasDirectives(names, root, false);
42
+ };
43
+ var hasAllDirectives = function (names, root) {
44
+ return hasDirectives(names, root, true);
45
+ };
41
46
  function hasDirectives(names, root, all) {
42
47
  var nameSet = new Set(names);
43
48
  var uniqueCount = nameSet.size;
44
49
  graphql.visit(root, {
45
50
  Directive: function (node) {
46
- if (nameSet.delete(node.name.value) &&
47
- (!all || !nameSet.size)) {
51
+ if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {
48
52
  return graphql.BREAK;
49
53
  }
50
54
  },
@@ -52,11 +56,11 @@ function hasDirectives(names, root, all) {
52
56
  return all ? !nameSet.size : nameSet.size < uniqueCount;
53
57
  }
54
58
  function hasClientExports(document) {
55
- return document && hasDirectives(['client', 'export'], document, true);
59
+ return document && hasDirectives(["client", "export"], document, true);
56
60
  }
57
61
  function isInclusionDirective(_a) {
58
62
  var value = _a.name.value;
59
- return value === 'skip' || value === 'include';
63
+ return value === "skip" || value === "include";
60
64
  }
61
65
  function getInclusionDirectives(directives) {
62
66
  var result = [];
@@ -68,32 +72,31 @@ function getInclusionDirectives(directives) {
68
72
  var directiveName = directive.name.value;
69
73
  globals.invariant(directiveArguments && directiveArguments.length === 1, 65, directiveName);
70
74
  var ifArgument = directiveArguments[0];
71
- globals.invariant(ifArgument.name && ifArgument.name.value === 'if', 66, directiveName);
75
+ globals.invariant(ifArgument.name && ifArgument.name.value === "if", 66, directiveName);
72
76
  var ifValue = ifArgument.value;
73
77
  globals.invariant(ifValue &&
74
- (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 67, directiveName);
78
+ (ifValue.kind === "Variable" || ifValue.kind === "BooleanValue"), 67, directiveName);
75
79
  result.push({ directive: directive, ifArgument: ifArgument });
76
80
  });
77
81
  }
78
82
  return result;
79
83
  }
80
84
 
81
- var canUseWeakMap = typeof WeakMap === 'function' &&
82
- globals.maybe(function () { return navigator.product; }) !== 'ReactNative';
83
- var canUseWeakSet = typeof WeakSet === 'function';
84
- var canUseSymbol = typeof Symbol === 'function' &&
85
- typeof Symbol.for === 'function';
85
+ var canUseWeakMap = typeof WeakMap === "function" &&
86
+ globals.maybe(function () { return navigator.product; }) !== "ReactNative";
87
+ var canUseWeakSet = typeof WeakSet === "function";
88
+ var canUseSymbol = typeof Symbol === "function" && typeof Symbol.for === "function";
86
89
  var canUseAsyncIteratorSymbol = canUseSymbol && Symbol.asyncIterator;
87
90
  var canUseDOM = typeof globals.maybe(function () { return window.document.createElement; }) === "function";
88
91
  var usingJSDOM = globals.maybe(function () { return navigator.userAgent.indexOf("jsdom") >= 0; }) || false;
89
92
  var canUseLayoutEffect = canUseDOM && !usingJSDOM;
90
93
 
91
94
  function isNonNullObject(obj) {
92
- return obj !== null && typeof obj === 'object';
95
+ return obj !== null && typeof obj === "object";
93
96
  }
94
97
  function isPlainObject(obj) {
95
98
  return (obj !== null &&
96
- typeof obj === 'object' &&
99
+ typeof obj === "object" &&
97
100
  (Object.getPrototypeOf(obj) === Object.prototype ||
98
101
  Object.getPrototypeOf(obj) === null));
99
102
  }
@@ -102,32 +105,32 @@ function getFragmentQueryDocument(document, fragmentName) {
102
105
  var actualFragmentName = fragmentName;
103
106
  var fragments = [];
104
107
  document.definitions.forEach(function (definition) {
105
- if (definition.kind === 'OperationDefinition') {
108
+ if (definition.kind === "OperationDefinition") {
106
109
  throw globals.newInvariantError(
107
110
  68,
108
111
  definition.operation,
109
- definition.name ? " named '".concat(definition.name.value, "'") : ''
112
+ definition.name ? " named '".concat(definition.name.value, "'") : ""
110
113
  );
111
114
  }
112
- if (definition.kind === 'FragmentDefinition') {
115
+ if (definition.kind === "FragmentDefinition") {
113
116
  fragments.push(definition);
114
117
  }
115
118
  });
116
- if (typeof actualFragmentName === 'undefined') {
119
+ if (typeof actualFragmentName === "undefined") {
117
120
  globals.invariant(fragments.length === 1, 69, fragments.length);
118
121
  actualFragmentName = fragments[0].name.value;
119
122
  }
120
123
  var query = tslib.__assign(tslib.__assign({}, document), { definitions: tslib.__spreadArray([
121
124
  {
122
- kind: 'OperationDefinition',
123
- operation: 'query',
125
+ kind: "OperationDefinition",
126
+ operation: "query",
124
127
  selectionSet: {
125
- kind: 'SelectionSet',
128
+ kind: "SelectionSet",
126
129
  selections: [
127
130
  {
128
- kind: 'FragmentSpread',
131
+ kind: "FragmentSpread",
129
132
  name: {
130
- kind: 'Name',
133
+ kind: "Name",
131
134
  value: actualFragmentName,
132
135
  },
133
136
  },
@@ -147,9 +150,9 @@ function createFragmentMap(fragments) {
147
150
  }
148
151
  function getFragmentFromSelection(selection, fragmentMap) {
149
152
  switch (selection.kind) {
150
- case 'InlineFragment':
153
+ case "InlineFragment":
151
154
  return selection;
152
- case 'FragmentSpread': {
155
+ case "FragmentSpread": {
153
156
  var fragmentName = selection.name.value;
154
157
  if (typeof fragmentMap === "function") {
155
158
  return fragmentMap(fragmentName);
@@ -167,7 +170,7 @@ function makeReference(id) {
167
170
  return { __ref: String(id) };
168
171
  }
169
172
  function isReference(obj) {
170
- return Boolean(obj && typeof obj === 'object' && typeof obj.__ref === 'string');
173
+ return Boolean(obj && typeof obj === "object" && typeof obj.__ref === "string");
171
174
  }
172
175
  function isDocumentNode(value) {
173
176
  return (isNonNullObject(value) &&
@@ -175,31 +178,31 @@ function isDocumentNode(value) {
175
178
  Array.isArray(value.definitions));
176
179
  }
177
180
  function isStringValue(value) {
178
- return value.kind === 'StringValue';
181
+ return value.kind === "StringValue";
179
182
  }
180
183
  function isBooleanValue(value) {
181
- return value.kind === 'BooleanValue';
184
+ return value.kind === "BooleanValue";
182
185
  }
183
186
  function isIntValue(value) {
184
- return value.kind === 'IntValue';
187
+ return value.kind === "IntValue";
185
188
  }
186
189
  function isFloatValue(value) {
187
- return value.kind === 'FloatValue';
190
+ return value.kind === "FloatValue";
188
191
  }
189
192
  function isVariable(value) {
190
- return value.kind === 'Variable';
193
+ return value.kind === "Variable";
191
194
  }
192
195
  function isObjectValue(value) {
193
- return value.kind === 'ObjectValue';
196
+ return value.kind === "ObjectValue";
194
197
  }
195
198
  function isListValue(value) {
196
- return value.kind === 'ListValue';
199
+ return value.kind === "ListValue";
197
200
  }
198
201
  function isEnumValue(value) {
199
- return value.kind === 'EnumValue';
202
+ return value.kind === "EnumValue";
200
203
  }
201
204
  function isNullValue(value) {
202
- return value.kind === 'NullValue';
205
+ return value.kind === "NullValue";
203
206
  }
204
207
  function valueToObjectRepresentation(argObj, name, value, variables) {
205
208
  if (isIntValue(value) || isFloatValue(value)) {
@@ -261,33 +264,33 @@ function storeKeyNameFromField(field, variables) {
261
264
  return getStoreKeyName(field.name.value, argObj, directivesObj);
262
265
  }
263
266
  var KNOWN_DIRECTIVES = [
264
- 'connection',
265
- 'include',
266
- 'skip',
267
- 'client',
268
- 'rest',
269
- 'export',
270
- 'nonreactive',
267
+ "connection",
268
+ "include",
269
+ "skip",
270
+ "client",
271
+ "rest",
272
+ "export",
273
+ "nonreactive",
271
274
  ];
272
275
  var getStoreKeyName = Object.assign(function (fieldName, args, directives) {
273
276
  if (args &&
274
277
  directives &&
275
- directives['connection'] &&
276
- directives['connection']['key']) {
277
- if (directives['connection']['filter'] &&
278
- directives['connection']['filter'].length > 0) {
279
- var filterKeys = directives['connection']['filter']
280
- ? directives['connection']['filter']
278
+ directives["connection"] &&
279
+ directives["connection"]["key"]) {
280
+ if (directives["connection"]["filter"] &&
281
+ directives["connection"]["filter"].length > 0) {
282
+ var filterKeys = directives["connection"]["filter"]
283
+ ? directives["connection"]["filter"]
281
284
  : [];
282
285
  filterKeys.sort();
283
286
  var filteredArgs_1 = {};
284
287
  filterKeys.forEach(function (key) {
285
288
  filteredArgs_1[key] = args[key];
286
289
  });
287
- return "".concat(directives['connection']['key'], "(").concat(stringify(filteredArgs_1), ")");
290
+ return "".concat(directives["connection"]["key"], "(").concat(stringify(filteredArgs_1), ")");
288
291
  }
289
292
  else {
290
- return directives['connection']['key'];
293
+ return directives["connection"]["key"];
291
294
  }
292
295
  }
293
296
  var completeFieldName = fieldName;
@@ -320,7 +323,9 @@ var stringify = function defaultStringify(value) {
320
323
  };
321
324
  function stringifyReplacer(_key, value) {
322
325
  if (isNonNullObject(value) && !Array.isArray(value)) {
323
- value = Object.keys(value).sort().reduce(function (copy, key) {
326
+ value = Object.keys(value)
327
+ .sort()
328
+ .reduce(function (copy, key) {
324
329
  copy[key] = value[key];
325
330
  return copy;
326
331
  }, {});
@@ -346,7 +351,7 @@ function getTypenameFromResult(result, selectionSet, fragmentMap) {
346
351
  for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {
347
352
  var selection = _a[_i];
348
353
  if (isField(selection)) {
349
- if (selection.name.value === '__typename') {
354
+ if (selection.name.value === "__typename") {
350
355
  return result[resultKeyNameFromField(selection)];
351
356
  }
352
357
  }
@@ -357,32 +362,32 @@ function getTypenameFromResult(result, selectionSet, fragmentMap) {
357
362
  fragments = [selection];
358
363
  }
359
364
  }
360
- if (typeof result.__typename === 'string') {
365
+ if (typeof result.__typename === "string") {
361
366
  return result.__typename;
362
367
  }
363
368
  if (fragments) {
364
369
  for (var _b = 0, fragments_1 = fragments; _b < fragments_1.length; _b++) {
365
370
  var selection = fragments_1[_b];
366
371
  var typename = getTypenameFromResult(result, getFragmentFromSelection(selection, fragmentMap).selectionSet, fragmentMap);
367
- if (typeof typename === 'string') {
372
+ if (typeof typename === "string") {
368
373
  return typename;
369
374
  }
370
375
  }
371
376
  }
372
377
  }
373
378
  function isField(selection) {
374
- return selection.kind === 'Field';
379
+ return selection.kind === "Field";
375
380
  }
376
381
  function isInlineFragment(selection) {
377
- return selection.kind === 'InlineFragment';
382
+ return selection.kind === "InlineFragment";
378
383
  }
379
384
 
380
385
  function checkDocument(doc) {
381
- globals.invariant(doc && doc.kind === 'Document', 71);
386
+ globals.invariant(doc && doc.kind === "Document", 71);
382
387
  var operations = doc.definitions
383
- .filter(function (d) { return d.kind !== 'FragmentDefinition'; })
388
+ .filter(function (d) { return d.kind !== "FragmentDefinition"; })
384
389
  .map(function (definition) {
385
- if (definition.kind !== 'OperationDefinition') {
390
+ if (definition.kind !== "OperationDefinition") {
386
391
  throw globals.newInvariantError(72, definition.kind);
387
392
  }
388
393
  return definition;
@@ -393,31 +398,31 @@ function checkDocument(doc) {
393
398
  function getOperationDefinition(doc) {
394
399
  checkDocument(doc);
395
400
  return doc.definitions.filter(function (definition) {
396
- return definition.kind === 'OperationDefinition';
401
+ return definition.kind === "OperationDefinition";
397
402
  })[0];
398
403
  }
399
404
  function getOperationName(doc) {
400
405
  return (doc.definitions
401
406
  .filter(function (definition) {
402
- return definition.kind === 'OperationDefinition' && !!definition.name;
407
+ return definition.kind === "OperationDefinition" && !!definition.name;
403
408
  })
404
409
  .map(function (x) { return x.name.value; })[0] || null);
405
410
  }
406
411
  function getFragmentDefinitions(doc) {
407
412
  return doc.definitions.filter(function (definition) {
408
- return definition.kind === 'FragmentDefinition';
413
+ return definition.kind === "FragmentDefinition";
409
414
  });
410
415
  }
411
416
  function getQueryDefinition(doc) {
412
417
  var queryDef = getOperationDefinition(doc);
413
- globals.invariant(queryDef && queryDef.operation === 'query', 74);
418
+ globals.invariant(queryDef && queryDef.operation === "query", 74);
414
419
  return queryDef;
415
420
  }
416
421
  function getFragmentDefinition(doc) {
417
- globals.invariant(doc.kind === 'Document', 75);
422
+ globals.invariant(doc.kind === "Document", 75);
418
423
  globals.invariant(doc.definitions.length <= 1, 76);
419
424
  var fragmentDef = doc.definitions[0];
420
- globals.invariant(fragmentDef.kind === 'FragmentDefinition', 77);
425
+ globals.invariant(fragmentDef.kind === "FragmentDefinition", 77);
421
426
  return fragmentDef;
422
427
  }
423
428
  function getMainDefinition(queryDoc) {
@@ -425,15 +430,15 @@ function getMainDefinition(queryDoc) {
425
430
  var fragmentDefinition;
426
431
  for (var _i = 0, _a = queryDoc.definitions; _i < _a.length; _i++) {
427
432
  var definition = _a[_i];
428
- if (definition.kind === 'OperationDefinition') {
433
+ if (definition.kind === "OperationDefinition") {
429
434
  var operation = definition.operation;
430
- if (operation === 'query' ||
431
- operation === 'mutation' ||
432
- operation === 'subscription') {
435
+ if (operation === "query" ||
436
+ operation === "mutation" ||
437
+ operation === "subscription") {
433
438
  return definition;
434
439
  }
435
440
  }
436
- if (definition.kind === 'FragmentDefinition' && !fragmentDefinition) {
441
+ if (definition.kind === "FragmentDefinition" && !fragmentDefinition) {
437
442
  fragmentDefinition = definition;
438
443
  }
439
444
  }
@@ -539,12 +544,15 @@ var TYPENAME_FIELD = {
539
544
  kind: graphql.Kind.FIELD,
540
545
  name: {
541
546
  kind: graphql.Kind.NAME,
542
- value: '__typename',
547
+ value: "__typename",
543
548
  },
544
549
  };
545
550
  function isEmpty(op, fragmentMap) {
546
- return !op || op.selectionSet.selections.every(function (selection) { return selection.kind === graphql.Kind.FRAGMENT_SPREAD &&
547
- isEmpty(fragmentMap[selection.name.value], fragmentMap); });
551
+ return (!op ||
552
+ op.selectionSet.selections.every(function (selection) {
553
+ return selection.kind === graphql.Kind.FRAGMENT_SPREAD &&
554
+ isEmpty(fragmentMap[selection.name.value], fragmentMap);
555
+ }));
548
556
  }
549
557
  function nullIfDocIsEmpty(doc) {
550
558
  return isEmpty(getOperationDefinition(doc) || getFragmentDefinition(doc), createFragmentMap(getFragmentDefinitions(doc)))
@@ -582,10 +590,10 @@ function makeInUseGetterFunction(defaultKey) {
582
590
  if (key === void 0) { key = defaultKey; }
583
591
  var inUse = map.get(key);
584
592
  if (!inUse) {
585
- map.set(key, inUse = {
586
- variables: new Set,
587
- fragmentSpreads: new Set,
588
- });
593
+ map.set(key, (inUse = {
594
+ variables: new Set(),
595
+ fragmentSpreads: new Set(),
596
+ }));
589
597
  }
590
598
  return inUse;
591
599
  };
@@ -615,8 +623,12 @@ function removeDirectivesFromDocument(directives, doc) {
615
623
  }
616
624
  }
617
625
  var directiveMatcher = getDirectiveMatcher(directives);
618
- var shouldRemoveField = function (nodeDirectives) { return (isNonEmptyArray(nodeDirectives) &&
619
- nodeDirectives.map(directiveMatcher).some(function (config) { return config && config.remove; })); };
626
+ var shouldRemoveField = function (nodeDirectives) {
627
+ return isNonEmptyArray(nodeDirectives) &&
628
+ nodeDirectives
629
+ .map(directiveMatcher)
630
+ .some(function (config) { return config && config.remove; });
631
+ };
620
632
  var originalFragmentDefsByPath = new Map();
621
633
  var firstVisitMadeChanges = false;
622
634
  var fieldOrInlineFragmentVisitor = {
@@ -665,8 +677,10 @@ function removeDirectivesFromDocument(directives, doc) {
665
677
  return node;
666
678
  }
667
679
  if (operationCount > 0 &&
668
- node.selectionSet.selections.every(function (selection) { return (selection.kind === graphql.Kind.FIELD &&
669
- selection.name.value === '__typename'); })) {
680
+ node.selectionSet.selections.every(function (selection) {
681
+ return selection.kind === graphql.Kind.FIELD &&
682
+ selection.name.value === "__typename";
683
+ })) {
670
684
  getInUseByFragmentName(node.name.value).removed = true;
671
685
  firstVisitMadeChanges = true;
672
686
  return null;
@@ -716,8 +730,10 @@ function removeDirectivesFromDocument(directives, doc) {
716
730
  allFragmentNamesUsed.add(childFragmentName);
717
731
  });
718
732
  });
719
- var fragmentWillBeRemoved = function (fragmentName) { return !!(!allFragmentNamesUsed.has(fragmentName) ||
720
- getInUseByFragmentName(fragmentName).removed); };
733
+ var fragmentWillBeRemoved = function (fragmentName) {
734
+ return !!((!allFragmentNamesUsed.has(fragmentName) ||
735
+ getInUseByFragmentName(fragmentName).removed));
736
+ };
721
737
  var enterVisitor = {
722
738
  enter: function (node) {
723
739
  if (fragmentWillBeRemoved(node.name.value)) {
@@ -733,7 +749,9 @@ function removeDirectivesFromDocument(directives, doc) {
733
749
  if (node.variableDefinitions) {
734
750
  var usedVariableNames_1 = populateTransitiveVars(getInUseByOperationName(node.name && node.name.value)).transitiveVars;
735
751
  if (usedVariableNames_1.size < node.variableDefinitions.length) {
736
- return tslib.__assign(tslib.__assign({}, node), { variableDefinitions: node.variableDefinitions.filter(function (varDef) { return usedVariableNames_1.has(varDef.variable.name.value); }) });
752
+ return tslib.__assign(tslib.__assign({}, node), { variableDefinitions: node.variableDefinitions.filter(function (varDef) {
753
+ return usedVariableNames_1.has(varDef.variable.name.value);
754
+ }) });
737
755
  }
738
756
  }
739
757
  },
@@ -745,7 +763,8 @@ var addTypenameToDocument = Object.assign(function (doc) {
745
763
  SelectionSet: {
746
764
  enter: function (node, _key, parent) {
747
765
  if (parent &&
748
- parent.kind === graphql.Kind.OPERATION_DEFINITION) {
766
+ parent.kind ===
767
+ graphql.Kind.OPERATION_DEFINITION) {
749
768
  return;
750
769
  }
751
770
  var selections = node.selections;
@@ -754,8 +773,8 @@ var addTypenameToDocument = Object.assign(function (doc) {
754
773
  }
755
774
  var skip = selections.some(function (selection) {
756
775
  return (isField(selection) &&
757
- (selection.name.value === '__typename' ||
758
- selection.name.value.lastIndexOf('__', 0) === 0));
776
+ (selection.name.value === "__typename" ||
777
+ selection.name.value.lastIndexOf("__", 0) === 0));
759
778
  });
760
779
  if (skip) {
761
780
  return;
@@ -763,7 +782,7 @@ var addTypenameToDocument = Object.assign(function (doc) {
763
782
  var field = parent;
764
783
  if (isField(field) &&
765
784
  field.directives &&
766
- field.directives.some(function (d) { return d.name.value === 'export'; })) {
785
+ field.directives.some(function (d) { return d.name.value === "export"; })) {
767
786
  return;
768
787
  }
769
788
  return tslib.__assign(tslib.__assign({}, node), { selections: tslib.__spreadArray(tslib.__spreadArray([], selections, true), [TYPENAME_FIELD], false) });
@@ -777,10 +796,10 @@ var addTypenameToDocument = Object.assign(function (doc) {
777
796
  });
778
797
  var connectionRemoveConfig = {
779
798
  test: function (directive) {
780
- var willRemove = directive.name.value === 'connection';
799
+ var willRemove = directive.name.value === "connection";
781
800
  if (willRemove) {
782
801
  if (!directive.arguments ||
783
- !directive.arguments.some(function (arg) { return arg.name.value === 'key'; })) {
802
+ !directive.arguments.some(function (arg) { return arg.name.value === "key"; })) {
784
803
  globalThis.__DEV__ !== false && globals.invariant.warn(81);
785
804
  }
786
805
  }
@@ -806,9 +825,11 @@ function removeArgumentsFromDocument(config, doc) {
806
825
  return nullIfDocIsEmpty(graphql.visit(doc, {
807
826
  OperationDefinition: {
808
827
  enter: function (node) {
809
- return tslib.__assign(tslib.__assign({}, node), { variableDefinitions: node.variableDefinitions ? node.variableDefinitions.filter(function (varDef) {
810
- return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });
811
- }) : [] });
828
+ return tslib.__assign(tslib.__assign({}, node), { variableDefinitions: node.variableDefinitions
829
+ ? node.variableDefinitions.filter(function (varDef) {
830
+ return !config.some(function (arg) { return arg.name === varDef.variable.name.value; });
831
+ })
832
+ : [] });
812
833
  },
813
834
  },
814
835
  Field: {
@@ -852,13 +873,13 @@ function removeFragmentSpreadFromDocument(config, doc) {
852
873
  function buildQueryFromSelectionSet(document) {
853
874
  var definition = getMainDefinition(document);
854
875
  var definitionOperation = definition.operation;
855
- if (definitionOperation === 'query') {
876
+ if (definitionOperation === "query") {
856
877
  return document;
857
878
  }
858
879
  var modifiedDoc = graphql.visit(document, {
859
880
  OperationDefinition: {
860
881
  enter: function (node) {
861
- return tslib.__assign(tslib.__assign({}, node), { operation: 'query' });
882
+ return tslib.__assign(tslib.__assign({}, node), { operation: "query" });
862
883
  },
863
884
  },
864
885
  });
@@ -868,7 +889,7 @@ function removeClientSetsFromDocument(document) {
868
889
  checkDocument(document);
869
890
  var modifiedDoc = removeDirectivesFromDocument([
870
891
  {
871
- test: function (directive) { return directive.name.value === 'client'; },
892
+ test: function (directive) { return directive.name.value === "client"; },
872
893
  remove: true,
873
894
  },
874
895
  ], document);
@@ -929,7 +950,9 @@ var DeepMerger = (function () {
929
950
  if (hasOwnProperty.call(target, sourceKey)) {
930
951
  var targetValue = target[sourceKey];
931
952
  if (source[sourceKey] !== targetValue) {
932
- var result = _this.reconciler.apply(_this, tslib.__spreadArray([target, source, sourceKey], context, false));
953
+ var result = _this.reconciler.apply(_this, tslib.__spreadArray([target,
954
+ source,
955
+ sourceKey], context, false));
933
956
  if (result !== targetValue) {
934
957
  target = _this.shallowCopyForMerge(target);
935
958
  target[sourceKey] = result;
@@ -1027,12 +1050,14 @@ function relayStylePagination(keyArgs) {
1027
1050
  if (!incoming) {
1028
1051
  return existing;
1029
1052
  }
1030
- var incomingEdges = incoming.edges ? incoming.edges.map(function (edge) {
1031
- if (isReference(edge = tslib.__assign({}, edge))) {
1032
- edge.cursor = readField("cursor", edge);
1033
- }
1034
- return edge;
1035
- }) : [];
1053
+ var incomingEdges = incoming.edges
1054
+ ? incoming.edges.map(function (edge) {
1055
+ if (isReference((edge = tslib.__assign({}, edge)))) {
1056
+ edge.cursor = readField("cursor", edge);
1057
+ }
1058
+ return edge;
1059
+ })
1060
+ : [];
1036
1061
  if (incoming.pageInfo) {
1037
1062
  var pageInfo_1 = incoming.pageInfo;
1038
1063
  var startCursor = pageInfo_1.startCursor, endCursor = pageInfo_1.endCursor;
@@ -1158,7 +1183,7 @@ function cloneDeep(value) {
1158
1183
  function cloneDeepHelper(val, seen) {
1159
1184
  switch (toString.call(val)) {
1160
1185
  case "[object Array]": {
1161
- seen = seen || new Map;
1186
+ seen = seen || new Map();
1162
1187
  if (seen.has(val))
1163
1188
  return seen.get(val);
1164
1189
  var copy_1 = val.slice(0);
@@ -1169,7 +1194,7 @@ function cloneDeepHelper(val, seen) {
1169
1194
  return copy_1;
1170
1195
  }
1171
1196
  case "[object Object]": {
1172
- seen = seen || new Map;
1197
+ seen = seen || new Map();
1173
1198
  if (seen.has(val))
1174
1199
  return seen.get(val);
1175
1200
  var copy_2 = Object.create(Object.getPrototypeOf(val));
@@ -1237,7 +1262,9 @@ function asyncMap(observable, mapFn, catchFn) {
1237
1262
  return function (arg) {
1238
1263
  ++activeCallbackCount;
1239
1264
  var both = function () { return examiner(arg); };
1240
- promiseQueue = promiseQueue.then(both, both).then(function (result) {
1265
+ promiseQueue = promiseQueue
1266
+ .then(both, both)
1267
+ .then(function (result) {
1241
1268
  --activeCallbackCount;
1242
1269
  next && next.call(observer, result);
1243
1270
  if (completed) {
@@ -1246,7 +1273,8 @@ function asyncMap(observable, mapFn, catchFn) {
1246
1273
  }, function (error) {
1247
1274
  --activeCallbackCount;
1248
1275
  throw error;
1249
- }).catch(function (caught) {
1276
+ })
1277
+ .catch(function (caught) {
1250
1278
  error && error.call(observer, caught);
1251
1279
  });
1252
1280
  };
@@ -1324,8 +1352,7 @@ var Concast = (function (_super) {
1324
1352
  if (sub)
1325
1353
  setTimeout(function () { return sub.unsubscribe(); });
1326
1354
  _this.sub = null;
1327
- if (_this.latest &&
1328
- _this.latest[0] === "next") {
1355
+ if (_this.latest && _this.latest[0] === "next") {
1329
1356
  _this.resolve(_this.latest[1]);
1330
1357
  }
1331
1358
  else {
@@ -1335,7 +1362,7 @@ var Concast = (function (_super) {
1335
1362
  iterateObserversSafely(_this.observers, "complete");
1336
1363
  }
1337
1364
  else if (isPromiseLike(value)) {
1338
- value.then(function (obs) { return _this.sub = obs.subscribe(_this.handlers); });
1365
+ value.then(function (obs) { return (_this.sub = obs.subscribe(_this.handlers)); });
1339
1366
  }
1340
1367
  else {
1341
1368
  _this.sub = value.subscribe(_this.handlers);
@@ -1374,9 +1401,7 @@ var Concast = (function (_super) {
1374
1401
  if (method) {
1375
1402
  method.call(observer, this.latest[1]);
1376
1403
  }
1377
- if (this.sub === null &&
1378
- nextOrError === "next" &&
1379
- observer.complete) {
1404
+ if (this.sub === null && nextOrError === "next" && observer.complete) {
1380
1405
  observer.complete();
1381
1406
  }
1382
1407
  }
@@ -1388,15 +1413,14 @@ var Concast = (function (_super) {
1388
1413
  }
1389
1414
  };
1390
1415
  Concast.prototype.removeObserver = function (observer) {
1391
- if (this.observers.delete(observer) &&
1392
- this.observers.size < 1) {
1416
+ if (this.observers.delete(observer) && this.observers.size < 1) {
1393
1417
  this.handlers.complete();
1394
1418
  }
1395
1419
  };
1396
1420
  Concast.prototype.notify = function (method, arg) {
1397
1421
  var nextResultListeners = this.nextResultListeners;
1398
1422
  if (nextResultListeners.size) {
1399
- this.nextResultListeners = new Set;
1423
+ this.nextResultListeners = new Set();
1400
1424
  nextResultListeners.forEach(function (listener) { return listener(method, arg); });
1401
1425
  }
1402
1426
  };
@@ -1496,7 +1520,9 @@ function stringifyForDisplay(value, space) {
1496
1520
  var undefId = makeUniqueId("stringifyForDisplay");
1497
1521
  return JSON.stringify(value, function (key, value) {
1498
1522
  return value === void 0 ? undefId : value;
1499
- }, space).split(JSON.stringify(undefId)).join("<undefined>");
1523
+ }, space)
1524
+ .split(JSON.stringify(undefId))
1525
+ .join("<undefined>");
1500
1526
  }
1501
1527
 
1502
1528
  function mergeOptions(defaults, options) {
@@ -1505,26 +1531,6 @@ function mergeOptions(defaults, options) {
1505
1531
  });
1506
1532
  }
1507
1533
 
1508
- function isNodeResponse(value) {
1509
- return !!value.body;
1510
- }
1511
- function isReadableStream(value) {
1512
- return !!value.getReader;
1513
- }
1514
- function isAsyncIterableIterator(value) {
1515
- return !!(canUseAsyncIteratorSymbol &&
1516
- value[Symbol.asyncIterator]);
1517
- }
1518
- function isStreamableBlob(value) {
1519
- return !!value.stream;
1520
- }
1521
- function isBlob(value) {
1522
- return !!value.arrayBuffer;
1523
- }
1524
- function isNodeReadableStream(value) {
1525
- return !!value.pipe;
1526
- }
1527
-
1528
1534
  function omitDeep(value, key) {
1529
1535
  return __omitDeep(value, key);
1530
1536
  }
@@ -1614,8 +1620,6 @@ exports.hasClientExports = hasClientExports;
1614
1620
  exports.hasDirectives = hasDirectives;
1615
1621
  exports.isApolloPayloadResult = isApolloPayloadResult;
1616
1622
  exports.isArray = isArray;
1617
- exports.isAsyncIterableIterator = isAsyncIterableIterator;
1618
- exports.isBlob = isBlob;
1619
1623
  exports.isDocumentNode = isDocumentNode;
1620
1624
  exports.isExecutionPatchIncrementalResult = isExecutionPatchIncrementalResult;
1621
1625
  exports.isExecutionPatchInitialResult = isExecutionPatchInitialResult;
@@ -1623,16 +1627,12 @@ exports.isExecutionPatchResult = isExecutionPatchResult;
1623
1627
  exports.isField = isField;
1624
1628
  exports.isInlineFragment = isInlineFragment;
1625
1629
  exports.isMutationOperation = isMutationOperation;
1626
- exports.isNodeReadableStream = isNodeReadableStream;
1627
- exports.isNodeResponse = isNodeResponse;
1628
1630
  exports.isNonEmptyArray = isNonEmptyArray;
1629
1631
  exports.isNonNullObject = isNonNullObject;
1630
1632
  exports.isPlainObject = isPlainObject;
1631
1633
  exports.isQueryOperation = isQueryOperation;
1632
- exports.isReadableStream = isReadableStream;
1633
1634
  exports.isReference = isReference;
1634
1635
  exports.isStatefulPromise = isStatefulPromise;
1635
- exports.isStreamableBlob = isStreamableBlob;
1636
1636
  exports.isSubscriptionOperation = isSubscriptionOperation;
1637
1637
  exports.iterateObserversSafely = iterateObserversSafely;
1638
1638
  exports.makeReference = makeReference;