@apollo/client 3.8.0-alpha.13 → 3.8.0-alpha.14

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 (420) hide show
  1. package/apollo-client.cjs +195 -164
  2. package/apollo-client.cjs.map +1 -1
  3. package/apollo-client.min.cjs +1 -1
  4. package/cache/cache.cjs +1 -1
  5. package/cache/cache.cjs.map +1 -1
  6. package/cache/cache.cjs.native.js +1 -1
  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.map +1 -1
  10. package/cache/core/types/Cache.d.ts +2 -2
  11. package/cache/core/types/Cache.d.ts.map +1 -1
  12. package/cache/core/types/Cache.js.map +1 -1
  13. package/cache/core/types/DataProxy.d.ts +4 -4
  14. package/cache/core/types/DataProxy.d.ts.map +1 -1
  15. package/cache/core/types/DataProxy.js.map +1 -1
  16. package/cache/core/types/common.d.ts +3 -3
  17. package/cache/core/types/common.d.ts.map +1 -1
  18. package/cache/core/types/common.js.map +1 -1
  19. package/cache/inmemory/entityStore.d.ts +5 -5
  20. package/cache/inmemory/entityStore.d.ts.map +1 -1
  21. package/cache/inmemory/entityStore.js.map +1 -1
  22. package/cache/inmemory/fragmentRegistry.d.ts +1 -1
  23. package/cache/inmemory/fragmentRegistry.d.ts.map +1 -1
  24. package/cache/inmemory/fragmentRegistry.js.map +1 -1
  25. package/cache/inmemory/helpers.d.ts +6 -5
  26. package/cache/inmemory/helpers.d.ts.map +1 -1
  27. package/cache/inmemory/helpers.js.map +1 -1
  28. package/cache/inmemory/inMemoryCache.d.ts +5 -5
  29. package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
  30. package/cache/inmemory/inMemoryCache.js.map +1 -1
  31. package/cache/inmemory/key-extractor.d.ts +1 -1
  32. package/cache/inmemory/key-extractor.d.ts.map +1 -1
  33. package/cache/inmemory/key-extractor.js.map +1 -1
  34. package/cache/inmemory/policies.d.ts +7 -6
  35. package/cache/inmemory/policies.d.ts.map +1 -1
  36. package/cache/inmemory/policies.js +1 -1
  37. package/cache/inmemory/policies.js.map +1 -1
  38. package/cache/inmemory/reactiveVars.d.ts +1 -1
  39. package/cache/inmemory/reactiveVars.d.ts.map +1 -1
  40. package/cache/inmemory/reactiveVars.js.map +1 -1
  41. package/cache/inmemory/readFromStore.d.ts +6 -6
  42. package/cache/inmemory/readFromStore.d.ts.map +1 -1
  43. package/cache/inmemory/readFromStore.js +2 -2
  44. package/cache/inmemory/readFromStore.js.map +1 -1
  45. package/cache/inmemory/types.d.ts +6 -6
  46. package/cache/inmemory/types.d.ts.map +1 -1
  47. package/cache/inmemory/types.js.map +1 -1
  48. package/cache/inmemory/writeToStore.d.ts +6 -6
  49. package/cache/inmemory/writeToStore.d.ts.map +1 -1
  50. package/cache/inmemory/writeToStore.js.map +1 -1
  51. package/core/ApolloClient.d.ts +10 -9
  52. package/core/ApolloClient.d.ts.map +1 -1
  53. package/core/ApolloClient.js +1 -1
  54. package/core/ApolloClient.js.map +1 -1
  55. package/core/LocalState.d.ts +6 -6
  56. package/core/LocalState.d.ts.map +1 -1
  57. package/core/LocalState.js +1 -1
  58. package/core/LocalState.js.map +1 -1
  59. package/core/ObservableQuery.d.ts +9 -8
  60. package/core/ObservableQuery.d.ts.map +1 -1
  61. package/core/ObservableQuery.js.map +1 -1
  62. package/core/QueryInfo.d.ts +9 -9
  63. package/core/QueryInfo.d.ts.map +1 -1
  64. package/core/QueryInfo.js.map +1 -1
  65. package/core/QueryManager.d.ts +6 -6
  66. package/core/QueryManager.d.ts.map +1 -1
  67. package/core/QueryManager.js.map +1 -1
  68. package/core/core.cjs +1 -1
  69. package/core/core.cjs.map +1 -1
  70. package/core/core.cjs.native.js +1 -1
  71. package/core/equalByQuery.d.ts +2 -2
  72. package/core/equalByQuery.d.ts.map +1 -1
  73. package/core/equalByQuery.js.map +1 -1
  74. package/core/types.d.ts +11 -11
  75. package/core/types.d.ts.map +1 -1
  76. package/core/types.js.map +1 -1
  77. package/core/watchQueryOptions.d.ts +6 -6
  78. package/core/watchQueryOptions.d.ts.map +1 -1
  79. package/core/watchQueryOptions.js.map +1 -1
  80. package/errors/index.d.ts +4 -4
  81. package/errors/index.d.ts.map +1 -1
  82. package/errors/index.js.map +1 -1
  83. package/invariantErrorCodes.js +45 -28
  84. package/link/batch/batchLink.d.ts +4 -3
  85. package/link/batch/batchLink.d.ts.map +1 -1
  86. package/link/batch/batchLink.js.map +1 -1
  87. package/link/batch/batching.d.ts +1 -1
  88. package/link/batch/batching.d.ts.map +1 -1
  89. package/link/batch/batching.js.map +1 -1
  90. package/link/batch-http/batchHttpLink.d.ts +3 -2
  91. package/link/batch-http/batchHttpLink.d.ts.map +1 -1
  92. package/link/batch-http/batchHttpLink.js.map +1 -1
  93. package/link/context/index.d.ts +3 -2
  94. package/link/context/index.d.ts.map +1 -1
  95. package/link/context/index.js.map +1 -1
  96. package/link/core/ApolloLink.d.ts +3 -2
  97. package/link/core/ApolloLink.d.ts.map +1 -1
  98. package/link/core/ApolloLink.js.map +1 -1
  99. package/link/core/types.d.ts +4 -3
  100. package/link/core/types.d.ts.map +1 -1
  101. package/link/core/types.js.map +1 -1
  102. package/link/error/index.d.ts +4 -3
  103. package/link/error/index.d.ts.map +1 -1
  104. package/link/error/index.js.map +1 -1
  105. package/link/http/HttpLink.d.ts +3 -2
  106. package/link/http/HttpLink.d.ts.map +1 -1
  107. package/link/http/HttpLink.js.map +1 -1
  108. package/link/http/createHttpLink.d.ts +1 -1
  109. package/link/http/createHttpLink.d.ts.map +1 -1
  110. package/link/http/createHttpLink.js.map +1 -1
  111. package/link/http/http.cjs +1 -1
  112. package/link/http/http.cjs.map +1 -1
  113. package/link/http/http.cjs.native.js +1 -1
  114. package/link/http/iterators/nodeStream.d.ts +1 -1
  115. package/link/http/iterators/nodeStream.d.ts.map +1 -1
  116. package/link/http/iterators/nodeStream.js.map +1 -1
  117. package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
  118. package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
  119. package/link/http/parseAndCheckHttpResponse.js.map +1 -1
  120. package/link/http/responseIterator.d.ts +1 -1
  121. package/link/http/responseIterator.d.ts.map +1 -1
  122. package/link/http/responseIterator.js.map +1 -1
  123. package/link/http/rewriteURIForGET.d.ts +1 -1
  124. package/link/http/rewriteURIForGET.d.ts.map +1 -1
  125. package/link/http/rewriteURIForGET.js.map +1 -1
  126. package/link/http/selectHttpOptionsAndBody.d.ts +3 -2
  127. package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
  128. package/link/http/selectHttpOptionsAndBody.js +1 -2
  129. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  130. package/link/http/selectURI.d.ts +1 -1
  131. package/link/http/selectURI.d.ts.map +1 -1
  132. package/link/http/selectURI.js.map +1 -1
  133. package/link/persisted-queries/index.d.ts +4 -3
  134. package/link/persisted-queries/index.d.ts.map +1 -1
  135. package/link/persisted-queries/index.js.map +1 -1
  136. package/link/remove-typename/index.d.ts +2 -0
  137. package/link/remove-typename/index.d.ts.map +1 -0
  138. package/link/remove-typename/index.js +2 -0
  139. package/link/remove-typename/index.js.map +1 -0
  140. package/link/remove-typename/package.json +8 -0
  141. package/link/remove-typename/remove-typename.cjs +70 -0
  142. package/link/remove-typename/remove-typename.cjs.map +1 -0
  143. package/link/remove-typename/remove-typename.cjs.native.js +70 -0
  144. package/link/remove-typename/removeTypenameFromVariables.d.ts +11 -0
  145. package/link/remove-typename/removeTypenameFromVariables.d.ts.map +1 -0
  146. package/link/remove-typename/removeTypenameFromVariables.js +62 -0
  147. package/link/remove-typename/removeTypenameFromVariables.js.map +1 -0
  148. package/link/retry/delayFunction.d.ts +1 -1
  149. package/link/retry/delayFunction.d.ts.map +1 -1
  150. package/link/retry/delayFunction.js.map +1 -1
  151. package/link/retry/retryFunction.d.ts +1 -1
  152. package/link/retry/retryFunction.d.ts.map +1 -1
  153. package/link/retry/retryFunction.js.map +1 -1
  154. package/link/retry/retryLink.d.ts +4 -3
  155. package/link/retry/retryLink.d.ts.map +1 -1
  156. package/link/retry/retryLink.js.map +1 -1
  157. package/link/schema/index.d.ts +3 -2
  158. package/link/schema/index.d.ts.map +1 -1
  159. package/link/schema/index.js.map +1 -1
  160. package/link/subscriptions/index.d.ts +2 -1
  161. package/link/subscriptions/index.d.ts.map +1 -1
  162. package/link/subscriptions/index.js +2 -2
  163. package/link/subscriptions/index.js.map +1 -1
  164. package/link/subscriptions/subscriptions.cjs +1 -1
  165. package/link/subscriptions/subscriptions.cjs.map +1 -1
  166. package/link/subscriptions/subscriptions.cjs.native.js +1 -1
  167. package/link/utils/createOperation.d.ts +1 -1
  168. package/link/utils/createOperation.d.ts.map +1 -1
  169. package/link/utils/createOperation.js.map +1 -1
  170. package/link/utils/filterOperationVariables.d.ts +1 -1
  171. package/link/utils/filterOperationVariables.d.ts.map +1 -1
  172. package/link/utils/filterOperationVariables.js.map +1 -1
  173. package/link/utils/toPromise.d.ts +1 -1
  174. package/link/utils/toPromise.d.ts.map +1 -1
  175. package/link/utils/toPromise.js.map +1 -1
  176. package/link/utils/transformOperation.d.ts +1 -1
  177. package/link/utils/transformOperation.d.ts.map +1 -1
  178. package/link/utils/transformOperation.js.map +1 -1
  179. package/link/utils/validateOperation.d.ts +1 -1
  180. package/link/utils/validateOperation.d.ts.map +1 -1
  181. package/link/utils/validateOperation.js.map +1 -1
  182. package/link/ws/index.d.ts +5 -3
  183. package/link/ws/index.d.ts.map +1 -1
  184. package/link/ws/index.js.map +1 -1
  185. package/package.json +18 -15
  186. package/react/cache/{QuerySubscription.d.ts → QueryReference.d.ts} +12 -11
  187. package/react/cache/QueryReference.d.ts.map +1 -0
  188. package/react/cache/{QuerySubscription.js → QueryReference.js} +37 -36
  189. package/react/cache/QueryReference.js.map +1 -0
  190. package/react/cache/SuspenseCache.d.ts +5 -5
  191. package/react/cache/SuspenseCache.d.ts.map +1 -1
  192. package/react/cache/SuspenseCache.js +8 -7
  193. package/react/cache/SuspenseCache.js.map +1 -1
  194. package/react/cache/types.d.ts +2 -0
  195. package/react/cache/types.d.ts.map +1 -0
  196. package/react/cache/types.js +2 -0
  197. package/react/cache/types.js.map +1 -0
  198. package/react/components/Mutation.d.ts +2 -2
  199. package/react/components/Mutation.d.ts.map +1 -1
  200. package/react/components/Mutation.js.map +1 -1
  201. package/react/components/Query.d.ts +2 -2
  202. package/react/components/Query.d.ts.map +1 -1
  203. package/react/components/Query.js.map +1 -1
  204. package/react/components/Subscription.d.ts +2 -2
  205. package/react/components/Subscription.d.ts.map +1 -1
  206. package/react/components/Subscription.js.map +1 -1
  207. package/react/components/types.d.ts +4 -4
  208. package/react/components/types.d.ts.map +1 -1
  209. package/react/components/types.js.map +1 -1
  210. package/react/context/ApolloConsumer.d.ts +1 -1
  211. package/react/context/ApolloConsumer.d.ts.map +1 -1
  212. package/react/context/ApolloConsumer.js.map +1 -1
  213. package/react/context/ApolloContext.d.ts +10 -3
  214. package/react/context/ApolloContext.d.ts.map +1 -1
  215. package/react/context/ApolloContext.js +13 -8
  216. package/react/context/ApolloContext.js.map +1 -1
  217. package/react/context/ApolloProvider.d.ts +2 -2
  218. package/react/context/ApolloProvider.d.ts.map +1 -1
  219. package/react/context/ApolloProvider.js +8 -12
  220. package/react/context/ApolloProvider.js.map +1 -1
  221. package/react/context/context.cjs +21 -20
  222. package/react/context/context.cjs.map +1 -1
  223. package/react/context/context.cjs.native.js +21 -20
  224. package/react/context/index.d.ts +1 -1
  225. package/react/context/index.d.ts.map +1 -1
  226. package/react/context/index.js +1 -1
  227. package/react/context/index.js.map +1 -1
  228. package/react/hoc/graphql.d.ts +3 -3
  229. package/react/hoc/graphql.d.ts.map +1 -1
  230. package/react/hoc/graphql.js.map +1 -1
  231. package/react/hoc/hoc-utils.d.ts +2 -2
  232. package/react/hoc/hoc-utils.d.ts.map +1 -1
  233. package/react/hoc/hoc-utils.js +1 -1
  234. package/react/hoc/hoc-utils.js.map +1 -1
  235. package/react/hoc/hoc.cjs +2 -2
  236. package/react/hoc/hoc.cjs.map +1 -1
  237. package/react/hoc/hoc.cjs.native.js +2 -2
  238. package/react/hoc/mutation-hoc.d.ts +4 -4
  239. package/react/hoc/mutation-hoc.d.ts.map +1 -1
  240. package/react/hoc/mutation-hoc.js.map +1 -1
  241. package/react/hoc/query-hoc.d.ts +2 -2
  242. package/react/hoc/query-hoc.d.ts.map +1 -1
  243. package/react/hoc/query-hoc.js.map +1 -1
  244. package/react/hoc/subscription-hoc.d.ts +2 -2
  245. package/react/hoc/subscription-hoc.d.ts.map +1 -1
  246. package/react/hoc/subscription-hoc.js.map +1 -1
  247. package/react/hoc/types.d.ts +4 -4
  248. package/react/hoc/types.d.ts.map +1 -1
  249. package/react/hoc/types.js.map +1 -1
  250. package/react/hoc/withApollo.d.ts +1 -1
  251. package/react/hoc/withApollo.d.ts.map +1 -1
  252. package/react/hoc/withApollo.js +1 -1
  253. package/react/hoc/withApollo.js.map +1 -1
  254. package/react/hooks/hooks.cjs +101 -32
  255. package/react/hooks/hooks.cjs.map +1 -1
  256. package/react/hooks/hooks.cjs.native.js +101 -32
  257. package/react/hooks/index.d.ts +2 -1
  258. package/react/hooks/index.d.ts.map +1 -1
  259. package/react/hooks/index.js +2 -1
  260. package/react/hooks/index.js.map +1 -1
  261. package/react/hooks/internal/useDeepMemo.d.ts +1 -1
  262. package/react/hooks/internal/useDeepMemo.d.ts.map +1 -1
  263. package/react/hooks/internal/useDeepMemo.js.map +1 -1
  264. package/react/hooks/useApolloClient.d.ts +1 -1
  265. package/react/hooks/useApolloClient.d.ts.map +1 -1
  266. package/react/hooks/useApolloClient.js +1 -1
  267. package/react/hooks/useApolloClient.js.map +1 -1
  268. package/react/hooks/useBackgroundQuery.d.ts +18 -0
  269. package/react/hooks/useBackgroundQuery.d.ts.map +1 -0
  270. package/react/hooks/useBackgroundQuery.js +71 -0
  271. package/react/hooks/useBackgroundQuery.js.map +1 -0
  272. package/react/hooks/useFragment.d.ts +12 -8
  273. package/react/hooks/useFragment.d.ts.map +1 -1
  274. package/react/hooks/useFragment.js +1 -1
  275. package/react/hooks/useFragment.js.map +1 -1
  276. package/react/hooks/useLazyQuery.d.ts +4 -4
  277. package/react/hooks/useLazyQuery.d.ts.map +1 -1
  278. package/react/hooks/useLazyQuery.js.map +1 -1
  279. package/react/hooks/useMutation.d.ts +4 -4
  280. package/react/hooks/useMutation.d.ts.map +1 -1
  281. package/react/hooks/useMutation.js +1 -1
  282. package/react/hooks/useMutation.js.map +1 -1
  283. package/react/hooks/useQuery.d.ts +3 -3
  284. package/react/hooks/useQuery.d.ts.map +1 -1
  285. package/react/hooks/useQuery.js +2 -2
  286. package/react/hooks/useQuery.js.map +1 -1
  287. package/react/hooks/useReactiveVar.d.ts +1 -1
  288. package/react/hooks/useReactiveVar.d.ts.map +1 -1
  289. package/react/hooks/useReactiveVar.js.map +1 -1
  290. package/react/hooks/useSubscription.d.ts +4 -4
  291. package/react/hooks/useSubscription.d.ts.map +1 -1
  292. package/react/hooks/useSubscription.js.map +1 -1
  293. package/react/hooks/useSuspenseCache.d.ts +1 -1
  294. package/react/hooks/useSuspenseCache.d.ts.map +1 -1
  295. package/react/hooks/useSuspenseCache.js +1 -1
  296. package/react/hooks/useSuspenseCache.js.map +1 -1
  297. package/react/hooks/useSuspenseQuery.d.ts +16 -6
  298. package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
  299. package/react/hooks/useSuspenseQuery.js +32 -29
  300. package/react/hooks/useSuspenseQuery.js.map +1 -1
  301. package/react/parser/index.d.ts +1 -1
  302. package/react/parser/index.d.ts.map +1 -1
  303. package/react/parser/index.js +5 -5
  304. package/react/parser/index.js.map +1 -1
  305. package/react/parser/parser.cjs +5 -5
  306. package/react/parser/parser.cjs.map +1 -1
  307. package/react/parser/parser.cjs.native.js +5 -5
  308. package/react/react.cjs +40 -37
  309. package/react/react.cjs.map +1 -1
  310. package/react/react.cjs.native.js +40 -37
  311. package/react/ssr/RenderPromises.d.ts +2 -2
  312. package/react/ssr/RenderPromises.d.ts.map +1 -1
  313. package/react/ssr/RenderPromises.js.map +1 -1
  314. package/react/ssr/renderToStringWithData.d.ts +1 -1
  315. package/react/ssr/renderToStringWithData.d.ts.map +1 -1
  316. package/react/ssr/renderToStringWithData.js.map +1 -1
  317. package/react/types/types.d.ts +8 -8
  318. package/react/types/types.d.ts.map +1 -1
  319. package/react/types/types.js.map +1 -1
  320. package/testing/core/core.cjs +1 -1
  321. package/testing/core/core.cjs.map +1 -1
  322. package/testing/core/core.cjs.native.js +1 -1
  323. package/testing/core/mocking/mockClient.d.ts +2 -2
  324. package/testing/core/mocking/mockClient.d.ts.map +1 -1
  325. package/testing/core/mocking/mockClient.js.map +1 -1
  326. package/testing/core/mocking/mockLink.d.ts +2 -1
  327. package/testing/core/mocking/mockLink.d.ts.map +1 -1
  328. package/testing/core/mocking/mockLink.js +2 -2
  329. package/testing/core/mocking/mockLink.js.map +1 -1
  330. package/testing/core/mocking/mockQueryManager.d.ts +1 -1
  331. package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
  332. package/testing/core/mocking/mockQueryManager.js.map +1 -1
  333. package/testing/core/mocking/mockSubscriptionLink.d.ts +2 -1
  334. package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
  335. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
  336. package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
  337. package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
  338. package/testing/core/mocking/mockWatchQuery.js.map +1 -1
  339. package/testing/core/observableToPromise.d.ts +2 -2
  340. package/testing/core/observableToPromise.d.ts.map +1 -1
  341. package/testing/core/observableToPromise.js.map +1 -1
  342. package/testing/core/subscribeAndCount.d.ts +1 -1
  343. package/testing/core/subscribeAndCount.d.ts.map +1 -1
  344. package/testing/core/subscribeAndCount.js.map +1 -1
  345. package/testing/react/MockedProvider.d.ts +7 -6
  346. package/testing/react/MockedProvider.d.ts.map +1 -1
  347. package/testing/react/MockedProvider.js.map +1 -1
  348. package/utilities/common/compact.d.ts +1 -1
  349. package/utilities/common/compact.d.ts.map +1 -1
  350. package/utilities/common/compact.js.map +1 -1
  351. package/utilities/common/errorHandling.d.ts +1 -1
  352. package/utilities/common/errorHandling.d.ts.map +1 -1
  353. package/utilities/common/errorHandling.js.map +1 -1
  354. package/utilities/common/incrementalResult.d.ts +1 -1
  355. package/utilities/common/incrementalResult.d.ts.map +1 -1
  356. package/utilities/common/incrementalResult.js.map +1 -1
  357. package/utilities/common/omitDeep.d.ts +10 -2
  358. package/utilities/common/omitDeep.d.ts.map +1 -1
  359. package/utilities/common/omitDeep.js +22 -10
  360. package/utilities/common/omitDeep.js.map +1 -1
  361. package/utilities/common/responseIterator.d.ts +2 -2
  362. package/utilities/common/responseIterator.d.ts.map +1 -1
  363. package/utilities/common/responseIterator.js.map +1 -1
  364. package/utilities/common/stripTypename.d.ts +9 -1
  365. package/utilities/common/stripTypename.d.ts.map +1 -1
  366. package/utilities/common/stripTypename.js +3 -2
  367. package/utilities/common/stripTypename.js.map +1 -1
  368. package/utilities/globals/global.d.ts +6 -3
  369. package/utilities/globals/global.d.ts.map +1 -1
  370. package/utilities/globals/global.js.map +1 -1
  371. package/utilities/graphql/directives.d.ts +1 -1
  372. package/utilities/graphql/directives.d.ts.map +1 -1
  373. package/utilities/graphql/directives.js +4 -4
  374. package/utilities/graphql/directives.js.map +1 -1
  375. package/utilities/graphql/fragments.d.ts +1 -1
  376. package/utilities/graphql/fragments.d.ts.map +1 -1
  377. package/utilities/graphql/fragments.js +3 -3
  378. package/utilities/graphql/fragments.js.map +1 -1
  379. package/utilities/graphql/getFromAST.d.ts +1 -1
  380. package/utilities/graphql/getFromAST.d.ts.map +1 -1
  381. package/utilities/graphql/getFromAST.js +8 -8
  382. package/utilities/graphql/getFromAST.js.map +1 -1
  383. package/utilities/graphql/storeUtils.d.ts +2 -2
  384. package/utilities/graphql/storeUtils.d.ts.map +1 -1
  385. package/utilities/graphql/storeUtils.js +14 -4
  386. package/utilities/graphql/storeUtils.js.map +1 -1
  387. package/utilities/graphql/transform.d.ts +1 -1
  388. package/utilities/graphql/transform.d.ts.map +1 -1
  389. package/utilities/graphql/transform.js +2 -2
  390. package/utilities/graphql/transform.js.map +1 -1
  391. package/utilities/index.d.ts +1 -1
  392. package/utilities/index.d.ts.map +1 -1
  393. package/utilities/index.js.map +1 -1
  394. package/utilities/observables/Concast.d.ts +2 -1
  395. package/utilities/observables/Concast.d.ts.map +1 -1
  396. package/utilities/observables/Concast.js.map +1 -1
  397. package/utilities/observables/Observable.d.ts +2 -1
  398. package/utilities/observables/Observable.d.ts.map +1 -1
  399. package/utilities/observables/Observable.js +1 -1
  400. package/utilities/observables/Observable.js.map +1 -1
  401. package/utilities/observables/asyncMap.d.ts.map +1 -1
  402. package/utilities/observables/asyncMap.js.map +1 -1
  403. package/utilities/observables/iteration.d.ts +1 -1
  404. package/utilities/observables/iteration.d.ts.map +1 -1
  405. package/utilities/observables/iteration.js.map +1 -1
  406. package/utilities/policies/pagination.d.ts +1 -1
  407. package/utilities/policies/pagination.d.ts.map +1 -1
  408. package/utilities/policies/pagination.js.map +1 -1
  409. package/utilities/types/DeepOmit.d.ts +1 -1
  410. package/utilities/types/DeepOmit.d.ts.map +1 -1
  411. package/utilities/types/DeepOmit.js.map +1 -1
  412. package/utilities/types/DeepPartial.d.ts +1 -1
  413. package/utilities/types/DeepPartial.d.ts.map +1 -1
  414. package/utilities/types/DeepPartial.js.map +1 -1
  415. package/utilities/utilities.cjs +54 -31
  416. package/utilities/utilities.cjs.map +1 -1
  417. package/utilities/utilities.cjs.native.js +54 -31
  418. package/version.js +1 -1
  419. package/react/cache/QuerySubscription.d.ts.map +0 -1
  420. package/react/cache/QuerySubscription.js.map +0 -1
@@ -18,7 +18,7 @@ function shouldInclude(_a, variables) {
18
18
  var evaledValue = false;
19
19
  if (ifArgument.value.kind === 'Variable') {
20
20
  evaledValue = variables && variables[ifArgument.value.name.value];
21
- globals.__DEV__ ? globals.invariant(evaledValue !== void 0, "Invalid variable referenced in @".concat(directive.name.value, " directive.")) : globals.invariant(evaledValue !== void 0, 41);
21
+ globals.__DEV__ ? globals.invariant(evaledValue !== void 0, "Invalid variable referenced in @".concat(directive.name.value, " directive.")) : globals.invariant(evaledValue !== void 0, 43);
22
22
  }
23
23
  else {
24
24
  evaledValue = ifArgument.value.value;
@@ -65,13 +65,13 @@ function getInclusionDirectives(directives) {
65
65
  return;
66
66
  var directiveArguments = directive.arguments;
67
67
  var directiveName = directive.name.value;
68
- globals.__DEV__ ? globals.invariant(directiveArguments && directiveArguments.length === 1, "Incorrect number of arguments for the @".concat(directiveName, " directive.")) : globals.invariant(directiveArguments && directiveArguments.length === 1, 42);
68
+ globals.__DEV__ ? globals.invariant(directiveArguments && directiveArguments.length === 1, "Incorrect number of arguments for the @".concat(directiveName, " directive.")) : globals.invariant(directiveArguments && directiveArguments.length === 1, 44);
69
69
  var ifArgument = directiveArguments[0];
70
- globals.__DEV__ ? globals.invariant(ifArgument.name && ifArgument.name.value === 'if', "Invalid argument for the @".concat(directiveName, " directive.")) : globals.invariant(ifArgument.name && ifArgument.name.value === 'if', 43);
70
+ globals.__DEV__ ? globals.invariant(ifArgument.name && ifArgument.name.value === 'if', "Invalid argument for the @".concat(directiveName, " directive.")) : globals.invariant(ifArgument.name && ifArgument.name.value === 'if', 45);
71
71
  var ifValue = ifArgument.value;
72
72
  globals.__DEV__ ? globals.invariant(ifValue &&
73
73
  (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), "Argument for the @".concat(directiveName, " directive must be a variable or a boolean value.")) : globals.invariant(ifValue &&
74
- (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 44);
74
+ (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 46);
75
75
  result.push({ directive: directive, ifArgument: ifArgument });
76
76
  });
77
77
  }
@@ -84,14 +84,14 @@ function getFragmentQueryDocument(document, fragmentName) {
84
84
  document.definitions.forEach(function (definition) {
85
85
  if (definition.kind === 'OperationDefinition') {
86
86
  throw globals.__DEV__ ? new globals.InvariantError("Found a ".concat(definition.operation, " operation").concat(definition.name ? " named '".concat(definition.name.value, "'") : '', ". ") +
87
- 'No operations are allowed when using a fragment as a query. Only fragments are allowed.') : new globals.InvariantError(45);
87
+ 'No operations are allowed when using a fragment as a query. Only fragments are allowed.') : new globals.InvariantError(47);
88
88
  }
89
89
  if (definition.kind === 'FragmentDefinition') {
90
90
  fragments.push(definition);
91
91
  }
92
92
  });
93
93
  if (typeof actualFragmentName === 'undefined') {
94
- globals.__DEV__ ? globals.invariant(fragments.length === 1, "Found ".concat(fragments.length, " fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")) : globals.invariant(fragments.length === 1, 46);
94
+ globals.__DEV__ ? globals.invariant(fragments.length === 1, "Found ".concat(fragments.length, " fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")) : globals.invariant(fragments.length === 1, 48);
95
95
  actualFragmentName = fragments[0].name.value;
96
96
  }
97
97
  var query = tslib.__assign(tslib.__assign({}, document), { definitions: tslib.__spreadArray([
@@ -132,7 +132,7 @@ function getFragmentFromSelection(selection, fragmentMap) {
132
132
  return fragmentMap(fragmentName);
133
133
  }
134
134
  var fragment = fragmentMap && fragmentMap[fragmentName];
135
- globals.__DEV__ ? globals.invariant(fragment, "No fragment named ".concat(fragmentName)) : globals.invariant(fragment, 47);
135
+ globals.__DEV__ ? globals.invariant(fragment, "No fragment named ".concat(fragmentName)) : globals.invariant(fragment, 49);
136
136
  return fragment || null;
137
137
  }
138
138
  default:
@@ -222,7 +222,7 @@ function valueToObjectRepresentation(argObj, name, value, variables) {
222
222
  else {
223
223
  throw globals.__DEV__ ? new globals.InvariantError("The inline argument \"".concat(name.value, "\" of kind \"").concat(value.kind, "\"") +
224
224
  'is not supported. Use variables instead of inline arguments to ' +
225
- 'overcome this limitation.') : new globals.InvariantError(56);
225
+ 'overcome this limitation.') : new globals.InvariantError(58);
226
226
  }
227
227
  }
228
228
  function storeKeyNameFromField(field, variables) {
@@ -331,9 +331,7 @@ function resultKeyNameFromField(field) {
331
331
  return field.alias ? field.alias.value : field.name.value;
332
332
  }
333
333
  function getTypenameFromResult(result, selectionSet, fragmentMap) {
334
- if (typeof result.__typename === 'string') {
335
- return result.__typename;
336
- }
334
+ var fragments;
337
335
  for (var _i = 0, _a = selectionSet.selections; _i < _a.length; _i++) {
338
336
  var selection = _a[_i];
339
337
  if (isField(selection)) {
@@ -341,7 +339,19 @@ function getTypenameFromResult(result, selectionSet, fragmentMap) {
341
339
  return result[resultKeyNameFromField(selection)];
342
340
  }
343
341
  }
342
+ else if (fragments) {
343
+ fragments.push(selection);
344
+ }
344
345
  else {
346
+ fragments = [selection];
347
+ }
348
+ }
349
+ if (typeof result.__typename === 'string') {
350
+ return result.__typename;
351
+ }
352
+ if (fragments) {
353
+ for (var _b = 0, fragments_1 = fragments; _b < fragments_1.length; _b++) {
354
+ var selection = fragments_1[_b];
345
355
  var typename = getTypenameFromResult(result, getFragmentFromSelection(selection, fragmentMap).selectionSet, fragmentMap);
346
356
  if (typeof typename === 'string') {
347
357
  return typename;
@@ -357,16 +367,16 @@ function isInlineFragment(selection) {
357
367
  }
358
368
 
359
369
  function checkDocument(doc) {
360
- globals.__DEV__ ? globals.invariant(doc && doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc && doc.kind === 'Document', 48);
370
+ globals.__DEV__ ? globals.invariant(doc && doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc && doc.kind === 'Document', 50);
361
371
  var operations = doc.definitions
362
372
  .filter(function (d) { return d.kind !== 'FragmentDefinition'; })
363
373
  .map(function (definition) {
364
374
  if (definition.kind !== 'OperationDefinition') {
365
- throw globals.__DEV__ ? new globals.InvariantError("Schema type definitions not allowed in queries. Found: \"".concat(definition.kind, "\"")) : new globals.InvariantError(49);
375
+ throw globals.__DEV__ ? new globals.InvariantError("Schema type definitions not allowed in queries. Found: \"".concat(definition.kind, "\"")) : new globals.InvariantError(51);
366
376
  }
367
377
  return definition;
368
378
  });
369
- globals.__DEV__ ? globals.invariant(operations.length <= 1, "Ambiguous GraphQL document: contains ".concat(operations.length, " operations")) : globals.invariant(operations.length <= 1, 50);
379
+ globals.__DEV__ ? globals.invariant(operations.length <= 1, "Ambiguous GraphQL document: contains ".concat(operations.length, " operations")) : globals.invariant(operations.length <= 1, 52);
370
380
  return doc;
371
381
  }
372
382
  function getOperationDefinition(doc) {
@@ -389,14 +399,14 @@ function getFragmentDefinitions(doc) {
389
399
  }
390
400
  function getQueryDefinition(doc) {
391
401
  var queryDef = getOperationDefinition(doc);
392
- globals.__DEV__ ? globals.invariant(queryDef && queryDef.operation === 'query', 'Must contain a query definition.') : globals.invariant(queryDef && queryDef.operation === 'query', 51);
402
+ globals.__DEV__ ? globals.invariant(queryDef && queryDef.operation === 'query', 'Must contain a query definition.') : globals.invariant(queryDef && queryDef.operation === 'query', 53);
393
403
  return queryDef;
394
404
  }
395
405
  function getFragmentDefinition(doc) {
396
- globals.__DEV__ ? globals.invariant(doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc.kind === 'Document', 52);
397
- globals.__DEV__ ? globals.invariant(doc.definitions.length <= 1, 'Fragment must have exactly one definition.') : globals.invariant(doc.definitions.length <= 1, 53);
406
+ globals.__DEV__ ? globals.invariant(doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc.kind === 'Document', 54);
407
+ globals.__DEV__ ? globals.invariant(doc.definitions.length <= 1, 'Fragment must have exactly one definition.') : globals.invariant(doc.definitions.length <= 1, 55);
398
408
  var fragmentDef = doc.definitions[0];
399
- globals.__DEV__ ? globals.invariant(fragmentDef.kind === 'FragmentDefinition', 'Must be a fragment definition.') : globals.invariant(fragmentDef.kind === 'FragmentDefinition', 54);
409
+ globals.__DEV__ ? globals.invariant(fragmentDef.kind === 'FragmentDefinition', 'Must be a fragment definition.') : globals.invariant(fragmentDef.kind === 'FragmentDefinition', 56);
400
410
  return fragmentDef;
401
411
  }
402
412
  function getMainDefinition(queryDoc) {
@@ -419,7 +429,7 @@ function getMainDefinition(queryDoc) {
419
429
  if (fragmentDefinition) {
420
430
  return fragmentDefinition;
421
431
  }
422
- throw globals.__DEV__ ? new globals.InvariantError('Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.') : new globals.InvariantError(55);
432
+ throw globals.__DEV__ ? new globals.InvariantError('Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.') : new globals.InvariantError(57);
423
433
  }
424
434
  function getDefaultValues(definition) {
425
435
  var defaultValues = Object.create(null);
@@ -1421,11 +1431,15 @@ function isNodeReadableStream(value) {
1421
1431
  return !!value.pipe;
1422
1432
  }
1423
1433
 
1424
- function omitDeep(value, key) {
1425
- return __omitDeep(value, key);
1434
+ var BREAK = Symbol('BREAK');
1435
+ function omitDeep(value, key, options) {
1436
+ if (options === void 0) { options = Object.create(null); }
1437
+ return __omitDeep(value, key, options);
1426
1438
  }
1427
- function __omitDeep(value, key, known) {
1439
+ omitDeep.BREAK = BREAK;
1440
+ function __omitDeep(value, key, options, known, path) {
1428
1441
  if (known === void 0) { known = new Map(); }
1442
+ if (path === void 0) { path = []; }
1429
1443
  if (known.has(value)) {
1430
1444
  return known.get(value);
1431
1445
  }
@@ -1434,7 +1448,11 @@ function __omitDeep(value, key, known) {
1434
1448
  var array_1 = [];
1435
1449
  known.set(value, array_1);
1436
1450
  value.forEach(function (value, index) {
1437
- var result = __omitDeep(value, key, known);
1451
+ var _a;
1452
+ var objectPath = path.concat(index);
1453
+ var result = ((_a = options.keep) === null || _a === void 0 ? void 0 : _a.call(options, objectPath)) === BREAK
1454
+ ? value
1455
+ : __omitDeep(value, key, options, known, objectPath);
1438
1456
  modified || (modified = result !== value);
1439
1457
  array_1[index] = result;
1440
1458
  });
@@ -1446,14 +1464,18 @@ function __omitDeep(value, key, known) {
1446
1464
  var obj_1 = Object.create(Object.getPrototypeOf(value));
1447
1465
  known.set(value, obj_1);
1448
1466
  Object.keys(value).forEach(function (k) {
1449
- if (k === key) {
1467
+ var _a;
1468
+ var objectPath = path.concat(k);
1469
+ var keep = (_a = options.keep) === null || _a === void 0 ? void 0 : _a.call(options, objectPath);
1470
+ if (k === key && keep !== true) {
1450
1471
  modified = true;
1472
+ return;
1451
1473
  }
1452
- else {
1453
- var result = __omitDeep(value[k], key, known);
1454
- modified || (modified = result !== value[k]);
1455
- obj_1[k] = result;
1456
- }
1474
+ var result = keep === BREAK
1475
+ ? value[k]
1476
+ : __omitDeep(value[k], key, options, known, objectPath);
1477
+ modified || (modified = result !== value[k]);
1478
+ obj_1[k] = result;
1457
1479
  });
1458
1480
  if (modified) {
1459
1481
  return obj_1;
@@ -1462,9 +1484,10 @@ function __omitDeep(value, key, known) {
1462
1484
  return value;
1463
1485
  }
1464
1486
 
1465
- function stripTypename(value) {
1466
- return omitDeep(value, '__typename');
1487
+ function stripTypename(value, options) {
1488
+ return omitDeep(value, '__typename', options);
1467
1489
  }
1490
+ stripTypename.BREAK = omitDeep.BREAK;
1468
1491
 
1469
1492
  exports.DEV = globals.DEV;
1470
1493
  exports.maybe = globals.maybe;