@apollo/client 3.8.0-rc.1 → 3.8.0-rc.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 (292) hide show
  1. package/apollo-client.cjs +231 -202
  2. package/apollo-client.cjs.map +1 -1
  3. package/apollo-client.min.cjs +1 -1
  4. package/cache/index.d.ts +13 -7
  5. package/cache/index.d.ts.map +1 -1
  6. package/cache/index.js +4 -4
  7. package/cache/index.js.map +1 -1
  8. package/cache/inmemory/types.d.ts +2 -2
  9. package/cache/inmemory/types.d.ts.map +1 -1
  10. package/cache/inmemory/types.js.map +1 -1
  11. package/core/core.cjs +2 -2
  12. package/core/core.cjs.map +1 -1
  13. package/core/core.cjs.native.js +2 -2
  14. package/core/equalByQuery.d.ts +2 -2
  15. package/core/equalByQuery.js +3 -3
  16. package/core/equalByQuery.js.map +1 -1
  17. package/core/index.d.ts +19 -14
  18. package/core/index.d.ts.map +1 -1
  19. package/core/index.js +12 -12
  20. package/core/index.js.map +1 -1
  21. package/core/types.d.ts +1 -1
  22. package/core/types.d.ts.map +1 -1
  23. package/core/types.js.map +1 -1
  24. package/dev/dev.cjs +22 -24
  25. package/dev/dev.cjs.map +1 -1
  26. package/dev/dev.cjs.native.js +22 -24
  27. package/dev/index.d.ts +3 -3
  28. package/dev/index.js +3 -3
  29. package/dev/index.js.map +1 -1
  30. package/dev/loadDevMessages.js +2 -2
  31. package/dev/loadDevMessages.js.map +1 -1
  32. package/dev/loadErrorMessageHandler.d.ts +1 -1
  33. package/dev/loadErrorMessageHandler.js +4 -4
  34. package/dev/loadErrorMessageHandler.js.map +1 -1
  35. package/dev/loadErrorMessages.js +2 -2
  36. package/dev/loadErrorMessages.js.map +1 -1
  37. package/invariantErrorCodes.js +16 -18
  38. package/link/batch/batchLink.d.ts +2 -1
  39. package/link/batch/batchLink.d.ts.map +1 -1
  40. package/link/batch/batchLink.js.map +1 -1
  41. package/link/core/types.d.ts +2 -2
  42. package/link/core/types.d.ts.map +1 -1
  43. package/link/core/types.js.map +1 -1
  44. package/link/http/index.d.ts +6 -3
  45. package/link/http/index.d.ts.map +1 -1
  46. package/link/http/index.js +1 -1
  47. package/link/http/index.js.map +1 -1
  48. package/link/remove-typename/index.d.ts +2 -1
  49. package/link/remove-typename/index.d.ts.map +1 -1
  50. package/link/remove-typename/index.js +1 -1
  51. package/link/remove-typename/index.js.map +1 -1
  52. package/link/remove-typename/remove-typename.cjs +2 -2
  53. package/link/remove-typename/remove-typename.cjs.map +1 -1
  54. package/link/remove-typename/remove-typename.cjs.native.js +2 -2
  55. package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
  56. package/link/remove-typename/removeTypenameFromVariables.js +6 -6
  57. package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
  58. package/link/utils/index.d.ts +2 -1
  59. package/link/utils/index.d.ts.map +1 -1
  60. package/link/utils/index.js.map +1 -1
  61. package/package.json +2 -10
  62. package/react/cache/QueryReference.d.ts +10 -6
  63. package/react/cache/QueryReference.d.ts.map +1 -1
  64. package/react/cache/QueryReference.js +42 -31
  65. package/react/cache/QueryReference.js.map +1 -1
  66. package/react/cache/SuspenseCache.d.ts +3 -3
  67. package/react/cache/SuspenseCache.d.ts.map +1 -1
  68. package/react/cache/SuspenseCache.js +3 -3
  69. package/react/cache/SuspenseCache.js.map +1 -1
  70. package/react/cache/getSuspenseCache.d.ts +4 -4
  71. package/react/cache/getSuspenseCache.js +2 -2
  72. package/react/cache/getSuspenseCache.js.map +1 -1
  73. package/react/cache/index.d.ts +3 -3
  74. package/react/cache/index.js +5 -5
  75. package/react/cache/index.js.map +1 -1
  76. package/react/cache/types.d.ts +5 -1
  77. package/react/cache/types.d.ts.map +1 -1
  78. package/react/cache/types.js.map +1 -1
  79. package/react/components/Mutation.d.ts +3 -3
  80. package/react/components/Mutation.js +3 -3
  81. package/react/components/Mutation.js.map +1 -1
  82. package/react/components/Query.d.ts +3 -3
  83. package/react/components/Query.d.ts.map +1 -1
  84. package/react/components/Query.js +3 -3
  85. package/react/components/Query.js.map +1 -1
  86. package/react/components/Subscription.d.ts +3 -3
  87. package/react/components/Subscription.d.ts.map +1 -1
  88. package/react/components/Subscription.js +3 -3
  89. package/react/components/Subscription.js.map +1 -1
  90. package/react/components/components.cjs +3 -3
  91. package/react/components/components.cjs.map +1 -1
  92. package/react/components/components.cjs.native.js +3 -3
  93. package/react/components/index.d.ts +4 -4
  94. package/react/components/index.js +4 -4
  95. package/react/components/index.js.map +1 -1
  96. package/react/components/types.d.ts +4 -4
  97. package/react/components/types.d.ts.map +1 -1
  98. package/react/components/types.js.map +1 -1
  99. package/react/context/ApolloConsumer.d.ts +2 -2
  100. package/react/context/ApolloConsumer.js +3 -3
  101. package/react/context/ApolloConsumer.js.map +1 -1
  102. package/react/context/ApolloContext.d.ts +3 -10
  103. package/react/context/ApolloContext.d.ts.map +1 -1
  104. package/react/context/ApolloContext.js +15 -13
  105. package/react/context/ApolloContext.js.map +1 -1
  106. package/react/context/ApolloProvider.d.ts +2 -2
  107. package/react/context/ApolloProvider.js +3 -3
  108. package/react/context/ApolloProvider.js.map +1 -1
  109. package/react/context/context.cjs +12 -10
  110. package/react/context/context.cjs.map +1 -1
  111. package/react/context/context.cjs.native.js +12 -10
  112. package/react/context/index.d.ts +7 -4
  113. package/react/context/index.d.ts.map +1 -1
  114. package/react/context/index.js +4 -4
  115. package/react/context/index.js.map +1 -1
  116. package/react/hoc/graphql.d.ts +3 -3
  117. package/react/hoc/graphql.js +4 -4
  118. package/react/hoc/graphql.js.map +1 -1
  119. package/react/hoc/hoc-utils.d.ts +3 -3
  120. package/react/hoc/hoc-utils.d.ts.map +1 -1
  121. package/react/hoc/hoc-utils.js +5 -5
  122. package/react/hoc/hoc-utils.js.map +1 -1
  123. package/react/hoc/hoc.cjs +24 -23
  124. package/react/hoc/hoc.cjs.map +1 -1
  125. package/react/hoc/hoc.cjs.native.js +24 -23
  126. package/react/hoc/index.d.ts +7 -7
  127. package/react/hoc/index.js +7 -7
  128. package/react/hoc/index.js.map +1 -1
  129. package/react/hoc/mutation-hoc.d.ts +5 -5
  130. package/react/hoc/mutation-hoc.d.ts.map +1 -1
  131. package/react/hoc/mutation-hoc.js +13 -11
  132. package/react/hoc/mutation-hoc.js.map +1 -1
  133. package/react/hoc/query-hoc.d.ts +3 -3
  134. package/react/hoc/query-hoc.d.ts.map +1 -1
  135. package/react/hoc/query-hoc.js +10 -10
  136. package/react/hoc/query-hoc.js.map +1 -1
  137. package/react/hoc/subscription-hoc.d.ts +3 -3
  138. package/react/hoc/subscription-hoc.d.ts.map +1 -1
  139. package/react/hoc/subscription-hoc.js +11 -12
  140. package/react/hoc/subscription-hoc.js.map +1 -1
  141. package/react/hoc/types.d.ts +4 -4
  142. package/react/hoc/types.d.ts.map +1 -1
  143. package/react/hoc/types.js.map +1 -1
  144. package/react/hoc/withApollo.d.ts +3 -3
  145. package/react/hoc/withApollo.js +6 -6
  146. package/react/hoc/withApollo.js.map +1 -1
  147. package/react/hooks/constants.d.ts +3 -0
  148. package/react/hooks/constants.d.ts.map +1 -0
  149. package/react/hooks/constants.js +2 -0
  150. package/react/hooks/constants.js.map +1 -0
  151. package/react/hooks/hooks.cjs +182 -160
  152. package/react/hooks/hooks.cjs.map +1 -1
  153. package/react/hooks/hooks.cjs.native.js +182 -160
  154. package/react/hooks/index.d.ts +15 -11
  155. package/react/hooks/index.d.ts.map +1 -1
  156. package/react/hooks/index.js +12 -11
  157. package/react/hooks/index.js.map +1 -1
  158. package/react/hooks/internal/__use.js +6 -6
  159. package/react/hooks/internal/__use.js.map +1 -1
  160. package/react/hooks/internal/index.d.ts +3 -3
  161. package/react/hooks/internal/index.js +3 -3
  162. package/react/hooks/internal/index.js.map +1 -1
  163. package/react/hooks/internal/useDeepMemo.d.ts +1 -1
  164. package/react/hooks/internal/useDeepMemo.js +2 -2
  165. package/react/hooks/internal/useDeepMemo.js.map +1 -1
  166. package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +1 -1
  167. package/react/hooks/internal/useIsomorphicLayoutEffect.js +2 -2
  168. package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
  169. package/react/hooks/useApolloClient.d.ts +1 -1
  170. package/react/hooks/useApolloClient.js +3 -3
  171. package/react/hooks/useApolloClient.js.map +1 -1
  172. package/react/hooks/useBackgroundQuery.d.ts +48 -21
  173. package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
  174. package/react/hooks/useBackgroundQuery.js +14 -17
  175. package/react/hooks/useBackgroundQuery.js.map +1 -1
  176. package/react/hooks/useFragment.d.ts.map +1 -1
  177. package/react/hooks/useFragment.js +7 -2
  178. package/react/hooks/useFragment.js.map +1 -1
  179. package/react/hooks/useLazyQuery.d.ts +4 -4
  180. package/react/hooks/useLazyQuery.d.ts.map +1 -1
  181. package/react/hooks/useLazyQuery.js +13 -12
  182. package/react/hooks/useLazyQuery.js.map +1 -1
  183. package/react/hooks/useMutation.d.ts +4 -4
  184. package/react/hooks/useMutation.d.ts.map +1 -1
  185. package/react/hooks/useMutation.js +28 -18
  186. package/react/hooks/useMutation.js.map +1 -1
  187. package/react/hooks/useQuery.d.ts +6 -5
  188. package/react/hooks/useQuery.d.ts.map +1 -1
  189. package/react/hooks/useQuery.js +45 -40
  190. package/react/hooks/useQuery.js.map +1 -1
  191. package/react/hooks/useReactiveVar.d.ts +1 -1
  192. package/react/hooks/useReactiveVar.js +1 -1
  193. package/react/hooks/useReactiveVar.js.map +1 -1
  194. package/react/hooks/useReadQuery.d.ts +2 -3
  195. package/react/hooks/useReadQuery.d.ts.map +1 -1
  196. package/react/hooks/useReadQuery.js +11 -24
  197. package/react/hooks/useReadQuery.js.map +1 -1
  198. package/react/hooks/useSubscription.d.ts +4 -4
  199. package/react/hooks/useSubscription.d.ts.map +1 -1
  200. package/react/hooks/useSubscription.js +10 -10
  201. package/react/hooks/useSubscription.js.map +1 -1
  202. package/react/hooks/useSuspenseQuery.d.ts +15 -10
  203. package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
  204. package/react/hooks/useSuspenseQuery.js +22 -18
  205. package/react/hooks/useSuspenseQuery.js.map +1 -1
  206. package/react/hooks/useSyncExternalStore.d.ts.map +1 -1
  207. package/react/hooks/useSyncExternalStore.js +33 -30
  208. package/react/hooks/useSyncExternalStore.js.map +1 -1
  209. package/react/index.d.ts +8 -6
  210. package/react/index.d.ts.map +1 -1
  211. package/react/index.js +6 -6
  212. package/react/index.js.map +1 -1
  213. package/react/parser/index.d.ts +1 -1
  214. package/react/parser/index.d.ts.map +1 -1
  215. package/react/parser/index.js +14 -12
  216. package/react/parser/index.js.map +1 -1
  217. package/react/parser/parser.cjs +13 -11
  218. package/react/parser/parser.cjs.map +1 -1
  219. package/react/parser/parser.cjs.native.js +13 -11
  220. package/react/react.cjs +34 -30
  221. package/react/react.cjs.map +1 -1
  222. package/react/react.cjs.native.js +34 -30
  223. package/react/ssr/RenderPromises.d.ts +2 -2
  224. package/react/ssr/RenderPromises.d.ts.map +1 -1
  225. package/react/ssr/RenderPromises.js +17 -15
  226. package/react/ssr/RenderPromises.js.map +1 -1
  227. package/react/ssr/getDataFromTree.d.ts +2 -2
  228. package/react/ssr/getDataFromTree.d.ts.map +1 -1
  229. package/react/ssr/getDataFromTree.js +9 -7
  230. package/react/ssr/getDataFromTree.js.map +1 -1
  231. package/react/ssr/index.d.ts +3 -3
  232. package/react/ssr/index.js +3 -3
  233. package/react/ssr/index.js.map +1 -1
  234. package/react/ssr/renderToStringWithData.d.ts +1 -1
  235. package/react/ssr/renderToStringWithData.js +3 -3
  236. package/react/ssr/renderToStringWithData.js.map +1 -1
  237. package/react/ssr/ssr.cjs +23 -19
  238. package/react/ssr/ssr.cjs.map +1 -1
  239. package/react/ssr/ssr.cjs.native.js +23 -19
  240. package/react/types/types.d.ts +18 -19
  241. package/react/types/types.d.ts.map +1 -1
  242. package/react/types/types.js.map +1 -1
  243. package/testing/core/index.d.ts +8 -7
  244. package/testing/core/index.d.ts.map +1 -1
  245. package/testing/core/index.js +7 -7
  246. package/testing/core/index.js.map +1 -1
  247. package/testing/index.d.ts +2 -1
  248. package/testing/index.d.ts.map +1 -1
  249. package/testing/index.js.map +1 -1
  250. package/testing/matchers/index.js +3 -3
  251. package/testing/matchers/index.js.map +1 -1
  252. package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +3 -3
  253. package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +6 -6
  254. package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
  255. package/testing/matchers/toMatchDocument.d.ts +2 -2
  256. package/testing/matchers/toMatchDocument.js +8 -8
  257. package/testing/matchers/toMatchDocument.js.map +1 -1
  258. package/utilities/common/omitDeep.d.ts +1 -1
  259. package/utilities/common/omitDeep.js +1 -1
  260. package/utilities/common/omitDeep.js.map +1 -1
  261. package/utilities/common/stripTypename.js +2 -2
  262. package/utilities/common/stripTypename.js.map +1 -1
  263. package/utilities/globals/globals.cjs +4 -4
  264. package/utilities/globals/globals.cjs.map +1 -1
  265. package/utilities/globals/globals.cjs.native.js +4 -4
  266. package/utilities/globals/invariantWrappers.d.ts +2 -2
  267. package/utilities/globals/invariantWrappers.js +7 -7
  268. package/utilities/globals/invariantWrappers.js.map +1 -1
  269. package/utilities/graphql/DocumentTransform.d.ts +1 -1
  270. package/utilities/graphql/DocumentTransform.js +4 -4
  271. package/utilities/graphql/DocumentTransform.js.map +1 -1
  272. package/utilities/graphql/operations.d.ts +1 -1
  273. package/utilities/graphql/operations.js +4 -4
  274. package/utilities/graphql/operations.js.map +1 -1
  275. package/utilities/graphql/print.d.ts +1 -1
  276. package/utilities/graphql/print.js +2 -2
  277. package/utilities/graphql/print.js.map +1 -1
  278. package/utilities/index.d.ts +40 -34
  279. package/utilities/index.d.ts.map +1 -1
  280. package/utilities/index.js +32 -32
  281. package/utilities/index.js.map +1 -1
  282. package/utilities/promises/decoration.d.ts +3 -3
  283. package/utilities/promises/decoration.js +8 -8
  284. package/utilities/promises/decoration.js.map +1 -1
  285. package/utilities/types/DeepOmit.d.ts +1 -1
  286. package/utilities/types/DeepOmit.js.map +1 -1
  287. package/utilities/types/DeepPartial.d.ts +1 -1
  288. package/utilities/types/DeepPartial.js.map +1 -1
  289. package/utilities/utilities.cjs +12 -12
  290. package/utilities/utilities.cjs.map +1 -1
  291. package/utilities/utilities.cjs.native.js +12 -12
  292. package/version.js +1 -1
@@ -1,7 +1,7 @@
1
- import type { SuspenseCacheOptions } from './index.js';
2
- import { SuspenseCache } from './SuspenseCache.js';
3
- import type { ApolloClient } from '../../core/ApolloClient.js';
4
- declare module '../../core/ApolloClient.js' {
1
+ import type { SuspenseCacheOptions } from "./index.js";
2
+ import { SuspenseCache } from "./SuspenseCache.js";
3
+ import type { ApolloClient } from "../../core/ApolloClient.js";
4
+ declare module "../../core/ApolloClient.js" {
5
5
  interface DefaultOptions {
6
6
  react?: {
7
7
  suspense?: Readonly<SuspenseCacheOptions>;
@@ -1,5 +1,5 @@
1
- import { SuspenseCache } from './SuspenseCache.js';
2
- var suspenseCacheSymbol = Symbol.for('apollo.suspenseCache');
1
+ import { SuspenseCache } from "./SuspenseCache.js";
2
+ var suspenseCacheSymbol = Symbol.for("apollo.suspenseCache");
3
3
  export function getSuspenseCache(client) {
4
4
  var _a;
5
5
  if (!client[suspenseCacheSymbol]) {
@@ -1 +1 @@
1
- {"version":3,"file":"getSuspenseCache.js","sourceRoot":"","sources":["../../../src/react/cache/getSuspenseCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAWnD,IAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAE/D,MAAM,UAAU,gBAAgB,CAC9B,MAEC;;IAED,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE;QAChC,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAI,aAAa,CAC7C,MAAA,MAAM,CAAC,cAAc,CAAC,KAAK,0CAAE,QAAQ,CACtC,CAAC;KACH;IAED,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import type { SuspenseCacheOptions } from './index.js';\nimport { SuspenseCache } from './SuspenseCache.js';\nimport type { ApolloClient } from '../../core/ApolloClient.js';\n\ndeclare module '../../core/ApolloClient.js' {\n interface DefaultOptions {\n react?: {\n suspense?: Readonly<SuspenseCacheOptions>;\n };\n }\n}\n\nconst suspenseCacheSymbol = Symbol.for('apollo.suspenseCache');\n\nexport function getSuspenseCache(\n client: ApolloClient<object> & {\n [suspenseCacheSymbol]?: SuspenseCache;\n }\n) {\n if (!client[suspenseCacheSymbol]) {\n client[suspenseCacheSymbol] = new SuspenseCache(\n client.defaultOptions.react?.suspense\n );\n }\n\n return client[suspenseCacheSymbol];\n}\n"]}
1
+ {"version":3,"file":"getSuspenseCache.js","sourceRoot":"","sources":["../../../src/react/cache/getSuspenseCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAWnD,IAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAE/D,MAAM,UAAU,gBAAgB,CAC9B,MAEC;;IAED,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE;QAChC,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAI,aAAa,CAC7C,MAAA,MAAM,CAAC,cAAc,CAAC,KAAK,0CAAE,QAAQ,CACtC,CAAC;KACH;IAED,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import type { SuspenseCacheOptions } from \"./index.js\";\nimport { SuspenseCache } from \"./SuspenseCache.js\";\nimport type { ApolloClient } from \"../../core/ApolloClient.js\";\n\ndeclare module \"../../core/ApolloClient.js\" {\n interface DefaultOptions {\n react?: {\n suspense?: Readonly<SuspenseCacheOptions>;\n };\n }\n}\n\nconst suspenseCacheSymbol = Symbol.for(\"apollo.suspenseCache\");\n\nexport function getSuspenseCache(\n client: ApolloClient<object> & {\n [suspenseCacheSymbol]?: SuspenseCache;\n }\n) {\n if (!client[suspenseCacheSymbol]) {\n client[suspenseCacheSymbol] = new SuspenseCache(\n client.defaultOptions.react?.suspense\n );\n }\n\n return client[suspenseCacheSymbol];\n}\n"]}
@@ -1,6 +1,6 @@
1
- export type { SuspenseCacheOptions } from './SuspenseCache.js';
2
- export { getSuspenseCache } from './getSuspenseCache.js';
3
- import { SuspenseCache as RealSuspenseCache } from './SuspenseCache.js';
1
+ export type { SuspenseCacheOptions } from "./SuspenseCache.js";
2
+ export { getSuspenseCache } from "./getSuspenseCache.js";
3
+ import { SuspenseCache as RealSuspenseCache } from "./SuspenseCache.js";
4
4
  export declare class SuspenseCache extends RealSuspenseCache {
5
5
  constructor();
6
6
  }
@@ -1,13 +1,13 @@
1
1
  import { __extends } from "tslib";
2
- export { getSuspenseCache } from './getSuspenseCache.js';
3
- import { SuspenseCache as RealSuspenseCache } from './SuspenseCache.js';
2
+ export { getSuspenseCache } from "./getSuspenseCache.js";
3
+ import { SuspenseCache as RealSuspenseCache } from "./SuspenseCache.js";
4
4
  var SuspenseCache = (function (_super) {
5
5
  __extends(SuspenseCache, _super);
6
6
  function SuspenseCache() {
7
7
  var _this = _super.call(this) || this;
8
- throw new Error('It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\n' +
9
- 'Please remove this code from your application. \n\n' +
10
- 'This export will be removed with the final 3.8 release.');
8
+ throw new Error("It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\n" +
9
+ "Please remove this code from your application. \n\n" +
10
+ "This export will be removed with the final 3.8 release.");
11
11
  return _this;
12
12
  }
13
13
  return SuspenseCache;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAYxE;IAAmC,iCAAiB;IAClD;QAAA,YACE,iBAAO,SAQR;QALC,MAAM,IAAI,KAAK,CACb,yGAAyG;YACzG,qDAAqD;YACrD,yDAAyD,CAC1D,CAAC;;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAXD,CAAmC,iBAAiB,GAWnD","sourcesContent":["export type { SuspenseCacheOptions } from './SuspenseCache.js';\nexport { getSuspenseCache } from './getSuspenseCache.js';\n\nimport { SuspenseCache as RealSuspenseCache } from './SuspenseCache.js';\n\n// TODO: remove export with release 3.8\n// replace with\n// export type { SuspenseCache } from './SuspenseCache.js';\n/**\n * @deprecated \n * It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\n * Please remove this code from your application.\n * \n * This export will be removed with the final 3.8 release.\n */\nexport class SuspenseCache extends RealSuspenseCache {\n constructor(){\n super();\n // throwing an error here instead of using invariant - we do not want this error\n // message to be link-ified, but to directly show up as bold as possible\n throw new Error(\n 'It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\\n' + \n 'Please remove this code from your application. \\n\\n' + \n 'This export will be removed with the final 3.8 release.'\n );\n }\n}"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAYxE;IAAmC,iCAAiB;IAClD;QAAA,YACE,iBAAO,SAQR;QALC,MAAM,IAAI,KAAK,CACb,yGAAyG;YACvG,qDAAqD;YACrD,yDAAyD,CAC5D,CAAC;;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAXD,CAAmC,iBAAiB,GAWnD","sourcesContent":["export type { SuspenseCacheOptions } from \"./SuspenseCache.js\";\nexport { getSuspenseCache } from \"./getSuspenseCache.js\";\n\nimport { SuspenseCache as RealSuspenseCache } from \"./SuspenseCache.js\";\n\n// TODO: remove export with release 3.8\n// replace with\n// export type { SuspenseCache } from './SuspenseCache.js';\n/**\n * @deprecated\n * It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\n * Please remove this code from your application.\n *\n * This export will be removed with the final 3.8 release.\n */\nexport class SuspenseCache extends RealSuspenseCache {\n constructor() {\n super();\n // throwing an error here instead of using invariant - we do not want this error\n // message to be link-ified, but to directly show up as bold as possible\n throw new Error(\n \"It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\\n\" +\n \"Please remove this code from your application. \\n\\n\" +\n \"This export will be removed with the final 3.8 release.\"\n );\n }\n}\n"]}
@@ -1,3 +1,7 @@
1
1
  import type { DocumentNode } from "graphql";
2
- export type CacheKey = [query: DocumentNode, stringifiedVariables: string, ...queryKey: any[]];
2
+ export type CacheKey = [
3
+ query: DocumentNode,
4
+ stringifiedVariables: string,
5
+ ...queryKey: any[]
6
+ ];
3
7
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/cache/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/cache/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,YAAY;IACnB,oBAAoB,EAAE,MAAM;IAC5B,GAAG,QAAQ,EAAE,GAAG,EAAE;CACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/react/cache/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nexport type CacheKey = [query: DocumentNode, stringifiedVariables: string, ...queryKey: any[]];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/react/cache/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from \"graphql\";\n\nexport type CacheKey = [\n query: DocumentNode,\n stringifiedVariables: string,\n ...queryKey: any[],\n];\n"]}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as PropTypes from 'prop-types';
3
- import type { OperationVariables } from '../../core/index.js';
4
- import type { MutationComponentOptions } from './types.js';
2
+ import * as PropTypes from "prop-types";
3
+ import type { OperationVariables } from "../../core/index.js";
4
+ import type { MutationComponentOptions } from "./types.js";
5
5
  export declare function Mutation<TData = any, TVariables = OperationVariables>(props: MutationComponentOptions<TData, TVariables>): JSX.Element | null;
6
6
  export declare namespace Mutation {
7
7
  var propTypes: PropTypes.InferProps<MutationComponentOptions<any, any, import("../../core/types.js").DefaultContext, import("../../core/index.js").ApolloCache<any>>>;
@@ -1,5 +1,5 @@
1
- import * as PropTypes from 'prop-types';
2
- import { useMutation } from '../hooks/index.js';
1
+ import * as PropTypes from "prop-types";
2
+ import { useMutation } from "../hooks/index.js";
3
3
  export function Mutation(props) {
4
4
  var _a = useMutation(props.mutation, props), runMutation = _a[0], result = _a[1];
5
5
  return props.children ? props.children(runMutation, result) : null;
@@ -10,7 +10,7 @@ Mutation.propTypes = {
10
10
  optimisticResponse: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
11
11
  refetchQueries: PropTypes.oneOfType([
12
12
  PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object])),
13
- PropTypes.func
13
+ PropTypes.func,
14
14
  ]),
15
15
  awaitRefetchQueries: PropTypes.bool,
16
16
  update: PropTypes.func,
@@ -1 +1 @@
1
- {"version":3,"file":"Mutation.js","sourceRoot":"","sources":["../../../src/react/components/Mutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CACtB,KAAkD;IAE5C,IAAA,KAAwB,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAzD,WAAW,QAAA,EAAE,MAAM,QAAsC,CAAC;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrE,CAAC;AAMD,QAAQ,CAAC,SAAS,GAAG;IACnB,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACrC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,kBAAkB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3E,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC;QAClC,SAAS,CAAC,OAAO,CACf,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAC1D;QACD,SAAS,CAAC,IAAI;KACf,CAAC;IACF,mBAAmB,EAAE,SAAS,CAAC,IAAI;IACnC,MAAM,EAAE,SAAS,CAAC,IAAI;IACtB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,WAAW,EAAE,SAAS,CAAC,MAAM;CACK,CAAC","sourcesContent":["import * as PropTypes from 'prop-types';\n\nimport type { OperationVariables } from '../../core/index.js';\nimport type { MutationComponentOptions } from './types.js';\nimport { useMutation } from '../hooks/index.js';\n\nexport function Mutation<TData = any, TVariables = OperationVariables>(\n props: MutationComponentOptions<TData, TVariables>\n) {\n const [runMutation, result] = useMutation(props.mutation, props);\n return props.children ? props.children(runMutation, result) : null;\n}\n\nexport interface Mutation<TData, TVariables> {\n propTypes: PropTypes.InferProps<MutationComponentOptions<TData, TVariables>>;\n}\n\nMutation.propTypes = {\n mutation: PropTypes.object.isRequired,\n variables: PropTypes.object,\n optimisticResponse: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),\n refetchQueries: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n ),\n PropTypes.func\n ]),\n awaitRefetchQueries: PropTypes.bool,\n update: PropTypes.func,\n children: PropTypes.func.isRequired,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n fetchPolicy: PropTypes.string,\n} as Mutation<any, any>[\"propTypes\"];\n"]}
1
+ {"version":3,"file":"Mutation.js","sourceRoot":"","sources":["../../../src/react/components/Mutation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CACtB,KAAkD;IAE5C,IAAA,KAAwB,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAzD,WAAW,QAAA,EAAE,MAAM,QAAsC,CAAC;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrE,CAAC;AAMD,QAAQ,CAAC,SAAS,GAAG;IACnB,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACrC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,kBAAkB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3E,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC;QAClC,SAAS,CAAC,OAAO,CACf,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAC1D;QACD,SAAS,CAAC,IAAI;KACf,CAAC;IACF,mBAAmB,EAAE,SAAS,CAAC,IAAI;IACnC,MAAM,EAAE,SAAS,CAAC,IAAI;IACtB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,WAAW,EAAE,SAAS,CAAC,MAAM;CACK,CAAC","sourcesContent":["import * as PropTypes from \"prop-types\";\n\nimport type { OperationVariables } from \"../../core/index.js\";\nimport type { MutationComponentOptions } from \"./types.js\";\nimport { useMutation } from \"../hooks/index.js\";\n\nexport function Mutation<TData = any, TVariables = OperationVariables>(\n props: MutationComponentOptions<TData, TVariables>\n) {\n const [runMutation, result] = useMutation(props.mutation, props);\n return props.children ? props.children(runMutation, result) : null;\n}\n\nexport interface Mutation<TData, TVariables> {\n propTypes: PropTypes.InferProps<MutationComponentOptions<TData, TVariables>>;\n}\n\nMutation.propTypes = {\n mutation: PropTypes.object.isRequired,\n variables: PropTypes.object,\n optimisticResponse: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),\n refetchQueries: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n ),\n PropTypes.func,\n ]),\n awaitRefetchQueries: PropTypes.bool,\n update: PropTypes.func,\n children: PropTypes.func.isRequired,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n fetchPolicy: PropTypes.string,\n} as Mutation<any, any>[\"propTypes\"];\n"]}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as PropTypes from 'prop-types';
3
- import type { OperationVariables } from '../../core/index.js';
4
- import type { QueryComponentOptions } from './types.js';
2
+ import * as PropTypes from "prop-types";
3
+ import type { OperationVariables } from "../../core/index.js";
4
+ import type { QueryComponentOptions } from "./types.js";
5
5
  export declare function Query<TData = any, TVariables extends OperationVariables = OperationVariables>(props: QueryComponentOptions<TData, TVariables>): JSX.Element | null;
6
6
  export declare namespace Query {
7
7
  var propTypes: PropTypes.InferProps<QueryComponentOptions<any, any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../src/react/components/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD,wBAAgB,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,EAC3F,KAAK,EAAE,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,sBAKhD;yBANe,KAAK;;;AAQrB,MAAM,WAAW,KAAK,CAAC,KAAK,EAAE,UAAU,SAAS,kBAAkB;IACjE,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3E"}
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../src/react/components/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD,wBAAgB,KAAK,CACnB,KAAK,GAAG,GAAG,EACX,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,EAC1D,KAAK,EAAE,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,sBAIhD;yBAPe,KAAK;;;AASrB,MAAM,WAAW,KAAK,CAAC,KAAK,EAAE,UAAU,SAAS,kBAAkB;IACjE,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3E"}
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
- import * as PropTypes from 'prop-types';
3
- import { useQuery } from '../hooks/index.js';
2
+ import * as PropTypes from "prop-types";
3
+ import { useQuery } from "../hooks/index.js";
4
4
  export function Query(props) {
5
5
  var children = props.children, query = props.query, options = __rest(props, ["children", "query"]);
6
6
  var result = useQuery(query, options);
@@ -18,6 +18,6 @@ Query.propTypes = {
18
18
  variables: PropTypes.object,
19
19
  ssr: PropTypes.bool,
20
20
  partialRefetch: PropTypes.bool,
21
- returnPartialData: PropTypes.bool
21
+ returnPartialData: PropTypes.bool,
22
22
  };
23
23
  //# sourceMappingURL=Query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../src/react/components/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,UAAU,KAAK,CACnB,KAA+C;IAEvC,IAAA,QAAQ,GAAwB,KAAK,SAA7B,EAAE,KAAK,GAAiB,KAAK,MAAtB,EAAK,OAAO,UAAK,KAAK,EAAvC,qBAA+B,CAAF,CAAW;IAC9C,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AAMD,KAAK,CAAC,SAAS,GAAG;IAChB,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,WAAW,EAAE,SAAS,CAAC,MAAM;IAC7B,2BAA2B,EAAE,SAAS,CAAC,IAAI;IAC3C,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,YAAY,EAAE,SAAS,CAAC,MAAM;IAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAClC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,GAAG,EAAE,SAAS,CAAC,IAAI;IACnB,cAAc,EAAE,SAAS,CAAC,IAAI;IAC9B,iBAAiB,EAAE,SAAS,CAAC,IAAI;CACF,CAAC","sourcesContent":["import * as PropTypes from 'prop-types';\n\nimport type { OperationVariables } from '../../core/index.js';\nimport type { QueryComponentOptions } from './types.js';\nimport { useQuery } from '../hooks/index.js';\n\nexport function Query<TData = any, TVariables extends OperationVariables = OperationVariables>(\n props: QueryComponentOptions<TData, TVariables>\n) {\n const { children, query, ...options } = props;\n const result = useQuery(query, options);\n return result ? children(result as any) : null;\n}\n\nexport interface Query<TData, TVariables extends OperationVariables> {\n propTypes: PropTypes.InferProps<QueryComponentOptions<TData, TVariables>>;\n}\n\nQuery.propTypes = {\n client: PropTypes.object,\n children: PropTypes.func.isRequired,\n fetchPolicy: PropTypes.string,\n notifyOnNetworkStatusChange: PropTypes.bool,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n pollInterval: PropTypes.number,\n query: PropTypes.object.isRequired,\n variables: PropTypes.object,\n ssr: PropTypes.bool,\n partialRefetch: PropTypes.bool,\n returnPartialData: PropTypes.bool\n} as Query<any, any>[\"propTypes\"];\n"]}
1
+ {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../src/react/components/Query.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,UAAU,KAAK,CAGnB,KAA+C;IACvC,IAAA,QAAQ,GAAwB,KAAK,SAA7B,EAAE,KAAK,GAAiB,KAAK,MAAtB,EAAK,OAAO,UAAK,KAAK,EAAvC,qBAA+B,CAAF,CAAW;IAC9C,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AAMD,KAAK,CAAC,SAAS,GAAG;IAChB,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,WAAW,EAAE,SAAS,CAAC,MAAM;IAC7B,2BAA2B,EAAE,SAAS,CAAC,IAAI;IAC3C,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,YAAY,EAAE,SAAS,CAAC,MAAM;IAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAClC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,GAAG,EAAE,SAAS,CAAC,IAAI;IACnB,cAAc,EAAE,SAAS,CAAC,IAAI;IAC9B,iBAAiB,EAAE,SAAS,CAAC,IAAI;CACF,CAAC","sourcesContent":["import * as PropTypes from \"prop-types\";\n\nimport type { OperationVariables } from \"../../core/index.js\";\nimport type { QueryComponentOptions } from \"./types.js\";\nimport { useQuery } from \"../hooks/index.js\";\n\nexport function Query<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n>(props: QueryComponentOptions<TData, TVariables>) {\n const { children, query, ...options } = props;\n const result = useQuery(query, options);\n return result ? children(result as any) : null;\n}\n\nexport interface Query<TData, TVariables extends OperationVariables> {\n propTypes: PropTypes.InferProps<QueryComponentOptions<TData, TVariables>>;\n}\n\nQuery.propTypes = {\n client: PropTypes.object,\n children: PropTypes.func.isRequired,\n fetchPolicy: PropTypes.string,\n notifyOnNetworkStatusChange: PropTypes.bool,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n pollInterval: PropTypes.number,\n query: PropTypes.object.isRequired,\n variables: PropTypes.object,\n ssr: PropTypes.bool,\n partialRefetch: PropTypes.bool,\n returnPartialData: PropTypes.bool,\n} as Query<any, any>[\"propTypes\"];\n"]}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as PropTypes from 'prop-types';
3
- import type { OperationVariables } from '../../core/index.js';
4
- import type { SubscriptionComponentOptions } from './types.js';
2
+ import * as PropTypes from "prop-types";
3
+ import type { OperationVariables } from "../../core/index.js";
4
+ import type { SubscriptionComponentOptions } from "./types.js";
5
5
  export declare function Subscription<TData = any, TVariables extends OperationVariables = OperationVariables>(props: SubscriptionComponentOptions<TData, TVariables>): JSX.Element | null;
6
6
  export declare namespace Subscription {
7
7
  var propTypes: PropTypes.InferProps<SubscriptionComponentOptions<any, any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Subscription.d.ts","sourceRoot":"","sources":["../../../src/react/components/Subscription.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAG/D,wBAAgB,YAAY,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,EAClG,KAAK,EAAE,4BAA4B,CAAC,KAAK,EAAE,UAAU,CAAC,sBAIvD;yBALe,YAAY;;;AAO5B,MAAM,WAAW,YAAY,CAAC,KAAK,EAAE,UAAU,SAAS,kBAAkB;IACxE,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,4BAA4B,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;CAClF"}
1
+ {"version":3,"file":"Subscription.d.ts","sourceRoot":"","sources":["../../../src/react/components/Subscription.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAG/D,wBAAgB,YAAY,CAC1B,KAAK,GAAG,GAAG,EACX,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,EAC1D,KAAK,EAAE,4BAA4B,CAAC,KAAK,EAAE,UAAU,CAAC,sBAGvD;yBANe,YAAY;;;AAQ5B,MAAM,WAAW,YAAY,CAAC,KAAK,EAAE,UAAU,SAAS,kBAAkB;IACxE,SAAS,EAAE,SAAS,CAAC,UAAU,CAC7B,4BAA4B,CAAC,KAAK,EAAE,UAAU,CAAC,CAChD,CAAC;CACH"}
@@ -1,5 +1,5 @@
1
- import * as PropTypes from 'prop-types';
2
- import { useSubscription } from '../hooks/index.js';
1
+ import * as PropTypes from "prop-types";
2
+ import { useSubscription } from "../hooks/index.js";
3
3
  export function Subscription(props) {
4
4
  var result = useSubscription(props.subscription, props);
5
5
  return props.children && result ? props.children(result) : null;
@@ -12,6 +12,6 @@ Subscription.propTypes = {
12
12
  onData: PropTypes.func,
13
13
  onSubscriptionComplete: PropTypes.func,
14
14
  onComplete: PropTypes.func,
15
- shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool])
15
+ shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
16
16
  };
17
17
  //# sourceMappingURL=Subscription.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/react/components/Subscription.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,YAAY,CAC1B,KAAsD;IAEtD,IAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC1D,OAAO,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAMD,YAAY,CAAC,SAAS,GAAG;IACvB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACzC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,kBAAkB,EAAE,SAAS,CAAC,IAAI;IAClC,MAAM,EAAE,SAAS,CAAC,IAAI;IACtB,sBAAsB,EAAE,SAAS,CAAC,IAAI;IACtC,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,iBAAiB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC","sourcesContent":["import * as PropTypes from 'prop-types';\n\nimport type { OperationVariables } from '../../core/index.js';\nimport type { SubscriptionComponentOptions } from './types.js';\nimport { useSubscription } from '../hooks/index.js';\n\nexport function Subscription<TData = any, TVariables extends OperationVariables = OperationVariables>(\n props: SubscriptionComponentOptions<TData, TVariables>\n) {\n const result = useSubscription(props.subscription, props);\n return props.children && result ? props.children(result) : null;\n}\n\nexport interface Subscription<TData, TVariables extends OperationVariables> {\n propTypes: PropTypes.InferProps<SubscriptionComponentOptions<TData, TVariables>>;\n}\n\nSubscription.propTypes = {\n subscription: PropTypes.object.isRequired,\n variables: PropTypes.object,\n children: PropTypes.func,\n onSubscriptionData: PropTypes.func,\n onData: PropTypes.func,\n onSubscriptionComplete: PropTypes.func,\n onComplete: PropTypes.func,\n shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool])\n} as Subscription<any, any>[\"propTypes\"];\n"]}
1
+ {"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/react/components/Subscription.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,YAAY,CAG1B,KAAsD;IACtD,IAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC1D,OAAO,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAQD,YAAY,CAAC,SAAS,GAAG;IACvB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACzC,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,kBAAkB,EAAE,SAAS,CAAC,IAAI;IAClC,MAAM,EAAE,SAAS,CAAC,IAAI;IACtB,sBAAsB,EAAE,SAAS,CAAC,IAAI;IACtC,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,iBAAiB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC","sourcesContent":["import * as PropTypes from \"prop-types\";\n\nimport type { OperationVariables } from \"../../core/index.js\";\nimport type { SubscriptionComponentOptions } from \"./types.js\";\nimport { useSubscription } from \"../hooks/index.js\";\n\nexport function Subscription<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n>(props: SubscriptionComponentOptions<TData, TVariables>) {\n const result = useSubscription(props.subscription, props);\n return props.children && result ? props.children(result) : null;\n}\n\nexport interface Subscription<TData, TVariables extends OperationVariables> {\n propTypes: PropTypes.InferProps<\n SubscriptionComponentOptions<TData, TVariables>\n >;\n}\n\nSubscription.propTypes = {\n subscription: PropTypes.object.isRequired,\n variables: PropTypes.object,\n children: PropTypes.func,\n onSubscriptionData: PropTypes.func,\n onData: PropTypes.func,\n onSubscriptionComplete: PropTypes.func,\n onComplete: PropTypes.func,\n shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n} as Subscription<any, any>[\"propTypes\"];\n"]}
@@ -37,7 +37,7 @@ Query.propTypes = {
37
37
  variables: PropTypes__namespace.object,
38
38
  ssr: PropTypes__namespace.bool,
39
39
  partialRefetch: PropTypes__namespace.bool,
40
- returnPartialData: PropTypes__namespace.bool
40
+ returnPartialData: PropTypes__namespace.bool,
41
41
  };
42
42
 
43
43
  function Mutation(props) {
@@ -50,7 +50,7 @@ Mutation.propTypes = {
50
50
  optimisticResponse: PropTypes__namespace.oneOfType([PropTypes__namespace.object, PropTypes__namespace.func]),
51
51
  refetchQueries: PropTypes__namespace.oneOfType([
52
52
  PropTypes__namespace.arrayOf(PropTypes__namespace.oneOfType([PropTypes__namespace.string, PropTypes__namespace.object])),
53
- PropTypes__namespace.func
53
+ PropTypes__namespace.func,
54
54
  ]),
55
55
  awaitRefetchQueries: PropTypes__namespace.bool,
56
56
  update: PropTypes__namespace.func,
@@ -72,7 +72,7 @@ Subscription.propTypes = {
72
72
  onData: PropTypes__namespace.func,
73
73
  onSubscriptionComplete: PropTypes__namespace.func,
74
74
  onComplete: PropTypes__namespace.func,
75
- shouldResubscribe: PropTypes__namespace.oneOfType([PropTypes__namespace.func, PropTypes__namespace.bool])
75
+ shouldResubscribe: PropTypes__namespace.oneOfType([PropTypes__namespace.func, PropTypes__namespace.bool]),
76
76
  };
77
77
 
78
78
  exports.Mutation = Mutation;
@@ -1 +1 @@
1
- {"version":3,"file":"components.cjs","sources":["Query.js","Mutation.js","Subscription.js"],"sourcesContent":["import { __rest } from \"tslib\";\nimport * as PropTypes from 'prop-types';\nimport { useQuery } from '../hooks/index.js';\nexport function Query(props) {\n var children = props.children, query = props.query, options = __rest(props, [\"children\", \"query\"]);\n var result = useQuery(query, options);\n return result ? children(result) : null;\n}\nQuery.propTypes = {\n client: PropTypes.object,\n children: PropTypes.func.isRequired,\n fetchPolicy: PropTypes.string,\n notifyOnNetworkStatusChange: PropTypes.bool,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n pollInterval: PropTypes.number,\n query: PropTypes.object.isRequired,\n variables: PropTypes.object,\n ssr: PropTypes.bool,\n partialRefetch: PropTypes.bool,\n returnPartialData: PropTypes.bool\n};\n//# sourceMappingURL=Query.js.map","import * as PropTypes from 'prop-types';\nimport { useMutation } from '../hooks/index.js';\nexport function Mutation(props) {\n var _a = useMutation(props.mutation, props), runMutation = _a[0], result = _a[1];\n return props.children ? props.children(runMutation, result) : null;\n}\nMutation.propTypes = {\n mutation: PropTypes.object.isRequired,\n variables: PropTypes.object,\n optimisticResponse: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),\n refetchQueries: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object])),\n PropTypes.func\n ]),\n awaitRefetchQueries: PropTypes.bool,\n update: PropTypes.func,\n children: PropTypes.func.isRequired,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n fetchPolicy: PropTypes.string,\n};\n//# sourceMappingURL=Mutation.js.map","import * as PropTypes from 'prop-types';\nimport { useSubscription } from '../hooks/index.js';\nexport function Subscription(props) {\n var result = useSubscription(props.subscription, props);\n return props.children && result ? props.children(result) : null;\n}\nSubscription.propTypes = {\n subscription: PropTypes.object.isRequired,\n variables: PropTypes.object,\n children: PropTypes.func,\n onSubscriptionData: PropTypes.func,\n onData: PropTypes.func,\n onSubscriptionComplete: PropTypes.func,\n onComplete: PropTypes.func,\n shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool])\n};\n//# sourceMappingURL=Subscription.js.map"],"names":["__rest","useQuery","PropTypes","useMutation","useSubscription"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,KAAK,CAAC,KAAK,EAAE;AAC7B,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,GAAGA,YAAM,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,C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AC,IAAI;AAC1C,IAAI,UAAU,EAAEA,oBAAS,CAAC,IAAI;AAC9B,IAAI,iBAAiB,EAAEA,oBAAS,CAAC,SAAS,CAAC,CAACA,oBAAS,CAAC,IAAI,EAAEA,oBAAS,CAAC,IAAI,CAAC,CAAC;AAC5E,CAAC;;;;;;"}
1
+ {"version":3,"file":"components.cjs","sources":["Query.js","Mutation.js","Subscription.js"],"sourcesContent":["import { __rest } from \"tslib\";\nimport * as PropTypes from \"prop-types\";\nimport { useQuery } from \"../hooks/index.js\";\nexport function Query(props) {\n var children = props.children, query = props.query, options = __rest(props, [\"children\", \"query\"]);\n var result = useQuery(query, options);\n return result ? children(result) : null;\n}\nQuery.propTypes = {\n client: PropTypes.object,\n children: PropTypes.func.isRequired,\n fetchPolicy: PropTypes.string,\n notifyOnNetworkStatusChange: PropTypes.bool,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n pollInterval: PropTypes.number,\n query: PropTypes.object.isRequired,\n variables: PropTypes.object,\n ssr: PropTypes.bool,\n partialRefetch: PropTypes.bool,\n returnPartialData: PropTypes.bool,\n};\n//# sourceMappingURL=Query.js.map","import * as PropTypes from \"prop-types\";\nimport { useMutation } from \"../hooks/index.js\";\nexport function Mutation(props) {\n var _a = useMutation(props.mutation, props), runMutation = _a[0], result = _a[1];\n return props.children ? props.children(runMutation, result) : null;\n}\nMutation.propTypes = {\n mutation: PropTypes.object.isRequired,\n variables: PropTypes.object,\n optimisticResponse: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),\n refetchQueries: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object])),\n PropTypes.func,\n ]),\n awaitRefetchQueries: PropTypes.bool,\n update: PropTypes.func,\n children: PropTypes.func.isRequired,\n onCompleted: PropTypes.func,\n onError: PropTypes.func,\n fetchPolicy: PropTypes.string,\n};\n//# sourceMappingURL=Mutation.js.map","import * as PropTypes from \"prop-types\";\nimport { useSubscription } from \"../hooks/index.js\";\nexport function Subscription(props) {\n var result = useSubscription(props.subscription, props);\n return props.children && result ? props.children(result) : null;\n}\nSubscription.propTypes = {\n subscription: PropTypes.object.isRequired,\n variables: PropTypes.object,\n children: PropTypes.func,\n onSubscriptionData: PropTypes.func,\n onData: PropTypes.func,\n onSubscriptionComplete: PropTypes.func,\n onComplete: PropTypes.func,\n shouldResubscribe: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n};\n//# sourceMappingURL=Subscription.js.map"],"names":["__rest","useQuery","PropTypes","useMutation","useSubscription"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,KAAK,CAAC,KAAK,EAAE;AAC7B,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,GAAGA,YAAM,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AACvG,IAAI,IAAI,MAAM,GAAGC,cAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1C,IAAI,OAAO,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAC5C,CAAC;AACD,KAAK,CAAC,SAAS,GAAG;AAClB,IAAI,MAAM,EAAEC,oBAAS,CAAC,MAAM;AAC5B,IAAI,QAAQ,EAAEA,oBAAS,CAAC,IAAI,CAAC,UAAU;AACvC,IAAI,WAAW,EAAEA,oBAAS,CAAC,MAAM;AACjC,IAAI,2BAA2B,EAAEA,oBAAS,CAAC,IAAI;AAC/C,IAAI,WAAW,EAAEA,oBAAS,CAAC,IAAI;AAC/B,IAAI,OAAO,EAAEA,oBAAS,CAAC,IAAI;AAC3B,IAAI,YAAY,EAAEA,oBAAS,CAAC,MAAM;AAClC,IAAI,KAAK,EAAEA,oBAAS,CAAC,MAAM,CAAC,UAAU;AACtC,IAAI,SAAS,EAAEA,oBAAS,CAAC,MAAM;AAC/B,IAAI,GAAG,EAAEA,oBAAS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;;AClBM,SAAS,YAAY,CAAC,KAAK,EAAE;AACpC,IAAI,IAAI,MAAM,GAAGE,qBAAe,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AAC5D,IAAI,OAAO,KAAK,CAAC,QAAQ,IAAI,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACpE,CAAC;AACD,YAAY,CAAC,SAAS,GAAG;AACzB,IAAI,YAAY,EAAEF,oBAAS,CAAC,MAAM,CAAC,UAAU;AAC7C,IAAI,SAAS,EAAEA,oBAAS,CAAC,MAAM;AAC/B,IAAI,QAAQ,EAAEA,oBAAS,CAAC,IAAI;AAC5B,IAAI,kBAAkB,EAAEA,oBAAS,CAAC,IAAI;AACtC,IAAI,MAAM,EAAEA,oBAAS,CAAC,IAAI;AAC1B,IAAI,sBAAsB,EAAEA,oBAAS,CAAC,IAAI;AAC1C,IAAI,UAAU,EAAEA,oBAAS,CAAC,IAAI;AAC9B,IAAI,iBAAiB,EAAEA,oBAAS,CAAC,SAAS,CAAC,CAACA,oBAAS,CAAC,IAAI,EAAEA,oBAAS,CAAC,IAAI,CAAC,CAAC;AAC5E,CAAC;;;;;;"}
@@ -37,7 +37,7 @@ Query.propTypes = {
37
37
  variables: PropTypes__namespace.object,
38
38
  ssr: PropTypes__namespace.bool,
39
39
  partialRefetch: PropTypes__namespace.bool,
40
- returnPartialData: PropTypes__namespace.bool
40
+ returnPartialData: PropTypes__namespace.bool,
41
41
  };
42
42
 
43
43
  function Mutation(props) {
@@ -50,7 +50,7 @@ Mutation.propTypes = {
50
50
  optimisticResponse: PropTypes__namespace.oneOfType([PropTypes__namespace.object, PropTypes__namespace.func]),
51
51
  refetchQueries: PropTypes__namespace.oneOfType([
52
52
  PropTypes__namespace.arrayOf(PropTypes__namespace.oneOfType([PropTypes__namespace.string, PropTypes__namespace.object])),
53
- PropTypes__namespace.func
53
+ PropTypes__namespace.func,
54
54
  ]),
55
55
  awaitRefetchQueries: PropTypes__namespace.bool,
56
56
  update: PropTypes__namespace.func,
@@ -72,7 +72,7 @@ Subscription.propTypes = {
72
72
  onData: PropTypes__namespace.func,
73
73
  onSubscriptionComplete: PropTypes__namespace.func,
74
74
  onComplete: PropTypes__namespace.func,
75
- shouldResubscribe: PropTypes__namespace.oneOfType([PropTypes__namespace.func, PropTypes__namespace.bool])
75
+ shouldResubscribe: PropTypes__namespace.oneOfType([PropTypes__namespace.func, PropTypes__namespace.bool]),
76
76
  };
77
77
 
78
78
  exports.Mutation = Mutation;
@@ -1,5 +1,5 @@
1
- export { Query } from './Query.js';
2
- export { Mutation } from './Mutation.js';
3
- export { Subscription } from './Subscription.js';
4
- export * from './types.js';
1
+ export { Query } from "./Query.js";
2
+ export { Mutation } from "./Mutation.js";
3
+ export { Subscription } from "./Subscription.js";
4
+ export * from "./types.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export { Query } from './Query.js';
2
- export { Mutation } from './Mutation.js';
3
- export { Subscription } from './Subscription.js';
4
- export * from './types.js';
1
+ export { Query } from "./Query.js";
2
+ export { Mutation } from "./Mutation.js";
3
+ export { Subscription } from "./Subscription.js";
4
+ export * from "./types.js";
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,YAAY,CAAC","sourcesContent":["export { Query } from './Query.js';\nexport { Mutation } from './Mutation.js';\nexport { Subscription } from './Subscription.js';\n\nexport * from './types.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,YAAY,CAAC","sourcesContent":["export { Query } from \"./Query.js\";\nexport { Mutation } from \"./Mutation.js\";\nexport { Subscription } from \"./Subscription.js\";\n\nexport * from \"./types.js\";\n"]}
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { DocumentNode } from 'graphql';
3
- import type { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
- import type { OperationVariables, DefaultContext, ApolloCache } from '../../core/index.js';
5
- import type { QueryFunctionOptions, QueryResult, BaseMutationOptions, MutationFunction, MutationResult, BaseSubscriptionOptions, SubscriptionResult } from '../types/types.js';
2
+ import type { DocumentNode } from "graphql";
3
+ import type { TypedDocumentNode } from "@graphql-typed-document-node/core";
4
+ import type { OperationVariables, DefaultContext, ApolloCache } from "../../core/index.js";
5
+ import type { QueryFunctionOptions, QueryResult, BaseMutationOptions, MutationFunction, MutationResult, BaseSubscriptionOptions, SubscriptionResult } from "../types/types.js";
6
6
  export interface QueryComponentOptions<TData = any, TVariables extends OperationVariables = OperationVariables> extends QueryFunctionOptions<TData, TVariables> {
7
7
  children: (result: QueryResult<TData, TVariables>) => JSX.Element | null;
8
8
  query: DocumentNode | TypedDocumentNode<TData, TVariables>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/components/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,E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AAK,CAAC,KAC1B,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B,CAC3C,KAAK,GAAG,GAAG,EACX,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,CAC1D,SAAQ,uBAAuB,CAAC,KAAK,EAAE,UAAU,CAAC;IAClD,YAAY,EAAE,YAAY,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAClE,QAAQ,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CAC/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/react/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { TypedDocumentNode } from '@graphql-typed-document-node/core';\n\nimport type { OperationVariables, DefaultContext, ApolloCache } from '../../core/index.js';\nimport type {\n QueryFunctionOptions,\n QueryResult,\n BaseMutationOptions,\n MutationFunction,\n MutationResult,\n BaseSubscriptionOptions,\n SubscriptionResult\n} from '../types/types.js';\n\nexport interface QueryComponentOptions<\n TData = any,\n TVariables extends OperationVariables = OperationVariables\n> extends QueryFunctionOptions<TData, TVariables> {\n children: (result: QueryResult<TData, TVariables>) => JSX.Element | null;\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n}\n\nexport interface MutationComponentOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>\n> extends BaseMutationOptions<TData, TVariables, TContext, TCache> {\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n children: (\n mutateFunction: MutationFunction<TData, TVariables, TContext>,\n result: MutationResult<TData>\n ) => JSX.Element | null;\n}\n\nexport interface SubscriptionComponentOptions<\n TData = any,\n TVariables extends OperationVariables = OperationVariables\n> extends BaseSubscriptionOptions<TData, TVariables> {\n subscription: DocumentNode | TypedDocumentNode<TData, TVariables>;\n children?: null | ((result: SubscriptionResult<TData>) => JSX.Element | null);\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/react/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DocumentNode } from \"graphql\";\nimport type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\n\nimport type {\n OperationVariables,\n DefaultContext,\n ApolloCache,\n} from \"../../core/index.js\";\nimport type {\n QueryFunctionOptions,\n QueryResult,\n BaseMutationOptions,\n MutationFunction,\n MutationResult,\n BaseSubscriptionOptions,\n SubscriptionResult,\n} from \"../types/types.js\";\n\nexport interface QueryComponentOptions<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n> extends QueryFunctionOptions<TData, TVariables> {\n children: (result: QueryResult<TData, TVariables>) => JSX.Element | null;\n query: DocumentNode | TypedDocumentNode<TData, TVariables>;\n}\n\nexport interface MutationComponentOptions<\n TData = any,\n TVariables = OperationVariables,\n TContext = DefaultContext,\n TCache extends ApolloCache<any> = ApolloCache<any>,\n> extends BaseMutationOptions<TData, TVariables, TContext, TCache> {\n mutation: DocumentNode | TypedDocumentNode<TData, TVariables>;\n children: (\n mutateFunction: MutationFunction<TData, TVariables, TContext>,\n result: MutationResult<TData>\n ) => JSX.Element | null;\n}\n\nexport interface SubscriptionComponentOptions<\n TData = any,\n TVariables extends OperationVariables = OperationVariables,\n> extends BaseSubscriptionOptions<TData, TVariables> {\n subscription: DocumentNode | TypedDocumentNode<TData, TVariables>;\n children?: null | ((result: SubscriptionResult<TData>) => JSX.Element | null);\n}\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import type { ApolloClient } from '../../core/index.js';
1
+ import * as React from "react";
2
+ import type { ApolloClient } from "../../core/index.js";
3
3
  export interface ApolloConsumerProps {
4
4
  children: (client: ApolloClient<object>) => React.ReactChild | null;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { invariant } from '../../utilities/globals/index.js';
2
- import * as React from 'react';
3
- import { getApolloContext } from './ApolloContext.js';
1
+ import { invariant } from "../../utilities/globals/index.js";
2
+ import * as React from "react";
3
+ import { getApolloContext } from "./ApolloContext.js";
4
4
  export var ApolloConsumer = function (props) {
5
5
  var ApolloContext = getApolloContext();
6
6
  return (React.createElement(ApolloContext.Consumer, null, function (context) {
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloConsumer.js","sourceRoot":"","sources":["../../../src/react/context/ApolloConsumer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,MAAM,CAAC,IAAM,cAAc,GAAkC,UAAA,KAAK;IAChE,IAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,QACpB,UAAC,OAAY;QACZ,SAAS,CACP,OAAO,IAAI,OAAO,CAAC,MAAM,EACzB,4DAA4D;YAC1D,iDAAiD,CACpD,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC,CACsB,CAC1B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { invariant } from '../../utilities/globals/index.js';\n\nimport * as React from 'react';\n\nimport type { ApolloClient } from '../../core/index.js';\nimport { getApolloContext } from './ApolloContext.js';\n\nexport interface ApolloConsumerProps {\n children: (client: ApolloClient<object>) => React.ReactChild | null;\n}\n\nexport const ApolloConsumer: React.FC<ApolloConsumerProps> = props => {\n const ApolloContext = getApolloContext();\n return (\n <ApolloContext.Consumer>\n {(context: any) => {\n invariant(\n context && context.client,\n 'Could not find \"client\" in the context of ApolloConsumer. ' +\n 'Wrap the root component in an <ApolloProvider>.'\n );\n return props.children(context.client);\n }}\n </ApolloContext.Consumer>\n );\n};\n"]}
1
+ {"version":3,"file":"ApolloConsumer.js","sourceRoot":"","sources":["../../../src/react/context/ApolloConsumer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,MAAM,CAAC,IAAM,cAAc,GAAkC,UAAC,KAAK;IACjE,IAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,QACpB,UAAC,OAAY;QACZ,SAAS,CACP,OAAO,IAAI,OAAO,CAAC,MAAM,EACzB,4DAA4D;YAC1D,iDAAiD,CACpD,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC,CACsB,CAC1B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { invariant } from \"../../utilities/globals/index.js\";\n\nimport * as React from \"react\";\n\nimport type { ApolloClient } from \"../../core/index.js\";\nimport { getApolloContext } from \"./ApolloContext.js\";\n\nexport interface ApolloConsumerProps {\n children: (client: ApolloClient<object>) => React.ReactChild | null;\n}\n\nexport const ApolloConsumer: React.FC<ApolloConsumerProps> = (props) => {\n const ApolloContext = getApolloContext();\n return (\n <ApolloContext.Consumer>\n {(context: any) => {\n invariant(\n context && context.client,\n 'Could not find \"client\" in the context of ApolloConsumer. ' +\n \"Wrap the root component in an <ApolloProvider>.\"\n );\n return props.children(context.client);\n }}\n </ApolloContext.Consumer>\n );\n};\n"]}
@@ -1,17 +1,10 @@
1
- import * as React from 'react';
2
- import type { ApolloClient } from '../../core/index.js';
3
- import type { RenderPromises } from '../ssr/index.js';
1
+ import * as React from "react";
2
+ import type { ApolloClient } from "../../core/index.js";
3
+ import type { RenderPromises } from "../ssr/index.js";
4
4
  export interface ApolloContextValue {
5
5
  client?: ApolloClient<object>;
6
6
  renderPromises?: RenderPromises;
7
7
  }
8
- declare global {
9
- interface Window {
10
- [contextKey]: Map<typeof React.createContext, React.Context<ApolloContextValue>>;
11
- }
12
- }
13
- declare const contextKey: unique symbol;
14
8
  export declare function getApolloContext(): React.Context<ApolloContextValue>;
15
9
  export declare const resetApolloContext: typeof getApolloContext;
16
- export {};
17
10
  //# sourceMappingURL=ApolloContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloContext.d.ts","sourceRoot":"","sources":["../../../src/react/context/ApolloContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,UAAU,CAAC,EAAE,GAAG,CACf,OAAO,KAAK,CAAC,aAAa,EAC1B,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAClC,CAAC;KACH;CACF;AAUD,QAAA,MAAM,UAAU,EAAE,OAAO,MAEQ,CAAC;AAElC,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAsBpE;AAOD,eAAO,MAAM,kBAAkB,yBAAmB,CAAC"}
1
+ {"version":3,"file":"ApolloContext.d.ts","sourceRoot":"","sources":["../../../src/react/context/ApolloContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAUD,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAuBpE;AAOD,eAAO,MAAM,kBAAkB,yBAAmB,CAAC"}
@@ -1,20 +1,22 @@
1
- import * as React from 'react';
2
- import { canUseSymbol } from '../../utilities/index.js';
3
- import { global, invariant } from '../../utilities/globals/index.js';
1
+ import * as React from "react";
2
+ import { canUseSymbol } from "../../utilities/index.js";
3
+ import { invariant } from "../../utilities/globals/index.js";
4
4
  var contextKey = canUseSymbol
5
- ? Symbol.for('__APOLLO_CONTEXT__')
6
- : '__APOLLO_CONTEXT__';
5
+ ? Symbol.for("__APOLLO_CONTEXT__")
6
+ : "__APOLLO_CONTEXT__";
7
7
  export function getApolloContext() {
8
- invariant('createContext' in React, 43);
9
- var contextStorage = global[contextKey] || (global[contextKey] = new Map());
10
- var value = contextStorage.get(React.createContext);
11
- if (!value) {
12
- value = Object.assign(React.createContext({}), {
13
- displayName: 'ApolloContext',
8
+ invariant("createContext" in React, 43);
9
+ var context = React.createContext[contextKey];
10
+ if (!context) {
11
+ Object.defineProperty(React.createContext, contextKey, {
12
+ value: (context = React.createContext({})),
13
+ enumerable: false,
14
+ writable: false,
15
+ configurable: true,
14
16
  });
15
- contextStorage.set(React.createContext, value);
17
+ context.displayName = "ApolloContext";
16
18
  }
17
- return value;
19
+ return context;
18
20
  }
19
21
  export var resetApolloContext = getApolloContext;
20
22
  //# sourceMappingURL=ApolloContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloContext.js","sourceRoot":"","sources":["../../../src/react/context/ApolloContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAwBrE,IAAM,UAAU,GAAkB,YAAY;IAC5C,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAClC,CAAC,CAAE,oBAA4B,CAAC;AAElC,MAAM,UAAU,gBAAgB;IAC9B,SAAS,CACP,eAAe,IAAI,KAAK,EACxB,+FAA+F;QAC7F,uGAAuG;QACvG,iEAAiE;QAEjE,sGAAsG,CACzG,CAAC;IAEF,IAAI,cAAc,GAChB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;IAEzD,IAAI,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK,EAAE;QACV,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAqB,EAAE,CAAC,EAAE;YACjE,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;QACH,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;KAChD;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAOD,MAAM,CAAC,IAAM,kBAAkB,GAAG,gBAAgB,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ApolloClient } from '../../core/index.js';\nimport { canUseSymbol } from '../../utilities/index.js';\nimport type { RenderPromises } from '../ssr/index.js';\nimport { global, invariant } from '../../utilities/globals/index.js';\n\nexport interface ApolloContextValue {\n client?: ApolloClient<object>;\n renderPromises?: RenderPromises;\n}\n\ndeclare global {\n interface Window {\n [contextKey]: Map<\n typeof React.createContext,\n React.Context<ApolloContextValue>\n >;\n }\n}\n\n// To make sure that Apollo Client does not create more than one React context\n// per React version, we store that Context in a global Map, keyed by the\n// React version. This way, if there are multiple versions of React loaded,\n// (e.g. in a Microfrontend environment), each React version will get its own\n// Apollo context.\n// If there are multiple versions of Apollo Client though, which can happen by\n// accident, this can avoid bugs where those multiple Apollo Client versions\n// would be unable to \"see each other\", even if an ApolloProvider was present.\nconst contextKey: unique symbol = canUseSymbol\n ? Symbol.for('__APOLLO_CONTEXT__')\n : ('__APOLLO_CONTEXT__' as any);\n\nexport function getApolloContext(): React.Context<ApolloContextValue> {\n invariant(\n 'createContext' in React,\n 'Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\n' +\n 'The Apollo Client functionality you are trying to use is only available in React Client Components.\\n' +\n 'Please make sure to add \"use client\" at the top of your file.\\n' +\n // TODO: change to React documentation once React documentation contains information about Client Components\n 'For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components'\n );\n\n let contextStorage =\n global[contextKey] || (global[contextKey] = new Map());\n\n let value = contextStorage.get(React.createContext);\n if (!value) {\n value = Object.assign(React.createContext<ApolloContextValue>({}), {\n displayName: 'ApolloContext',\n });\n contextStorage.set(React.createContext, value);\n }\n\n return value;\n}\n\n/**\n * @deprecated This function has no \"resetting\" effect since Apollo Client 3.4.12,\n * and will be removed in the next major version of Apollo Client.\n * If you want to get the Apollo Context, use `getApolloContext` instead.\n */\nexport const resetApolloContext = getApolloContext;\n"]}
1
+ {"version":3,"file":"ApolloContext.js","sourceRoot":"","sources":["../../../src/react/context/ApolloContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAW7D,IAAM,UAAU,GAAG,YAAY;IAC7B,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAClC,CAAC,CAAC,oBAAoB,CAAC;AAEzB,MAAM,UAAU,gBAAgB;IAC9B,SAAS,CACP,eAAe,IAAI,KAAK,EACxB,+FAA+F;QAC7F,uGAAuG;QACvG,iEAAiE;QAEjE,sGAAsG,CACzG,CAAC;IAEF,IAAI,OAAO,GAAI,KAAK,CAAC,aAAqB,CACxC,UAAU,CAC0B,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,aAAa,EAAE,UAAU,EAAE;YACrD,KAAK,EAAE,CAAC,OAAO,GAAG,KAAK,CAAC,aAAa,CAAqB,EAAE,CAAC,CAAC;YAC9D,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,OAAO,CAAC,WAAW,GAAG,eAAe,CAAC;KACvC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAOD,MAAM,CAAC,IAAM,kBAAkB,GAAG,gBAAgB,CAAC","sourcesContent":["import * as React from \"react\";\nimport type { ApolloClient } from \"../../core/index.js\";\nimport { canUseSymbol } from \"../../utilities/index.js\";\nimport type { RenderPromises } from \"../ssr/index.js\";\nimport { invariant } from \"../../utilities/globals/index.js\";\n\nexport interface ApolloContextValue {\n client?: ApolloClient<object>;\n renderPromises?: RenderPromises;\n}\n\n// To make sure Apollo Client doesn't create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nconst contextKey = canUseSymbol\n ? Symbol.for(\"__APOLLO_CONTEXT__\")\n : \"__APOLLO_CONTEXT__\";\n\nexport function getApolloContext(): React.Context<ApolloContextValue> {\n invariant(\n \"createContext\" in React,\n \"Invoking `getApolloContext` in an environment where `React.createContext` is not available.\\n\" +\n \"The Apollo Client functionality you are trying to use is only available in React Client Components.\\n\" +\n 'Please make sure to add \"use client\" at the top of your file.\\n' +\n // TODO: change to React documentation once React documentation contains information about Client Components\n \"For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components\"\n );\n\n let context = (React.createContext as any)[\n contextKey\n ] as React.Context<ApolloContextValue>;\n if (!context) {\n Object.defineProperty(React.createContext, contextKey, {\n value: (context = React.createContext<ApolloContextValue>({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = \"ApolloContext\";\n }\n return context;\n}\n\n/**\n * @deprecated This function has no \"resetting\" effect since Apollo Client 3.4.12,\n * and will be removed in the next major version of Apollo Client.\n * If you want to get the Apollo Context, use `getApolloContext` instead.\n */\nexport const resetApolloContext = getApolloContext;\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import type { ApolloClient } from '../../core/index.js';
1
+ import * as React from "react";
2
+ import type { ApolloClient } from "../../core/index.js";
3
3
  export interface ApolloProviderProps<TCache> {
4
4
  client: ApolloClient<TCache>;
5
5
  children: React.ReactNode | React.ReactNode[] | null;
@@ -1,7 +1,7 @@
1
1
  import { __assign } from "tslib";
2
- import { invariant } from '../../utilities/globals/index.js';
3
- import * as React from 'react';
4
- import { getApolloContext } from './ApolloContext.js';
2
+ import { invariant } from "../../utilities/globals/index.js";
3
+ import * as React from "react";
4
+ import { getApolloContext } from "./ApolloContext.js";
5
5
  export var ApolloProvider = function (_a) {
6
6
  var client = _a.client, children = _a.children;
7
7
  var ApolloContext = getApolloContext();
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloProvider.js","sourceRoot":"","sources":["../../../src/react/context/ApolloProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOtD,MAAM,CAAC,IAAM,cAAc,GAAuC,UAAC,EAGlE;QAFC,MAAM,YAAA,EACN,QAAQ,cAAA;IAER,IAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEtD,IAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,6BACK,aAAa,KAChB,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,MAAM,IACtC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IAE5B,SAAS,CACP,OAAO,CAAC,MAAM,EACd,wDAAwD;QACtD,qDAAqD,CACxD,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,QAAQ,CAA0B,CAC5E,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { invariant } from '../../utilities/globals/index.js';\n\nimport * as React from 'react';\n\nimport type { ApolloClient } from '../../core/index.js';\nimport { getApolloContext } from './ApolloContext.js';\n\nexport interface ApolloProviderProps<TCache> {\n client: ApolloClient<TCache>;\n children: React.ReactNode | React.ReactNode[] | null;\n}\n\nexport const ApolloProvider: React.FC<ApolloProviderProps<any>> = ({\n client,\n children,\n}) => {\n const ApolloContext = getApolloContext();\n const parentContext = React.useContext(ApolloContext);\n\n const context = React.useMemo(() => {\n return {\n ...parentContext,\n client: client || parentContext.client,\n };\n }, [parentContext, client]);\n\n invariant(\n context.client,\n 'ApolloProvider was not passed a client instance. Make ' +\n 'sure you pass in your client via the \"client\" prop.'\n );\n\n return (\n <ApolloContext.Provider value={context}>{children}</ApolloContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"file":"ApolloProvider.js","sourceRoot":"","sources":["../../../src/react/context/ApolloProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOtD,MAAM,CAAC,IAAM,cAAc,GAAuC,UAAC,EAGlE;QAFC,MAAM,YAAA,EACN,QAAQ,cAAA;IAER,IAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEtD,IAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,6BACK,aAAa,KAChB,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,MAAM,IACtC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IAE5B,SAAS,CACP,OAAO,CAAC,MAAM,EACd,wDAAwD;QACtD,qDAAqD,CACxD,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,QAAQ,CAA0B,CAC5E,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { invariant } from \"../../utilities/globals/index.js\";\n\nimport * as React from \"react\";\n\nimport type { ApolloClient } from \"../../core/index.js\";\nimport { getApolloContext } from \"./ApolloContext.js\";\n\nexport interface ApolloProviderProps<TCache> {\n client: ApolloClient<TCache>;\n children: React.ReactNode | React.ReactNode[] | null;\n}\n\nexport const ApolloProvider: React.FC<ApolloProviderProps<any>> = ({\n client,\n children,\n}) => {\n const ApolloContext = getApolloContext();\n const parentContext = React.useContext(ApolloContext);\n\n const context = React.useMemo(() => {\n return {\n ...parentContext,\n client: client || parentContext.client,\n };\n }, [parentContext, client]);\n\n invariant(\n context.client,\n \"ApolloProvider was not passed a client instance. Make \" +\n 'sure you pass in your client via the \"client\" prop.'\n );\n\n return (\n <ApolloContext.Provider value={context}>{children}</ApolloContext.Provider>\n );\n};\n"]}
@@ -22,19 +22,21 @@ function _interopNamespace(e) {
22
22
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
23
23
 
24
24
  var contextKey = utilities.canUseSymbol
25
- ? Symbol.for('__APOLLO_CONTEXT__')
26
- : '__APOLLO_CONTEXT__';
25
+ ? Symbol.for("__APOLLO_CONTEXT__")
26
+ : "__APOLLO_CONTEXT__";
27
27
  function getApolloContext() {
28
- globals.invariant('createContext' in React__namespace, 43);
29
- var contextStorage = globals.global[contextKey] || (globals.global[contextKey] = new Map());
30
- var value = contextStorage.get(React__namespace.createContext);
31
- if (!value) {
32
- value = Object.assign(React__namespace.createContext({}), {
33
- displayName: 'ApolloContext',
28
+ globals.invariant("createContext" in React__namespace, 43);
29
+ var context = React__namespace.createContext[contextKey];
30
+ if (!context) {
31
+ Object.defineProperty(React__namespace.createContext, contextKey, {
32
+ value: (context = React__namespace.createContext({})),
33
+ enumerable: false,
34
+ writable: false,
35
+ configurable: true,
34
36
  });
35
- contextStorage.set(React__namespace.createContext, value);
37
+ context.displayName = "ApolloContext";
36
38
  }
37
- return value;
39
+ return context;
38
40
  }
39
41
  var resetApolloContext = getApolloContext;
40
42