@apollo/client 4.0.0-alpha.4 → 4.0.0-alpha.6

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 (254) hide show
  1. package/.changeset/eleven-kangaroos-jump.md +5 -0
  2. package/.changeset/forty-shrimps-fry.md +5 -0
  3. package/.changeset/giant-bags-share.md +5 -0
  4. package/.changeset/grumpy-vans-type.md +5 -0
  5. package/.changeset/little-spoons-kick.md +7 -0
  6. package/.changeset/loud-cows-raise.md +7 -0
  7. package/.changeset/many-buses-allow.md +5 -0
  8. package/.changeset/nervous-fireants-bow.md +5 -0
  9. package/.changeset/poor-eels-punch.md +5 -0
  10. package/.changeset/pre.json +17 -0
  11. package/.changeset/real-teachers-peel.md +5 -0
  12. package/.changeset/slimy-chicken-melt.md +5 -0
  13. package/.changeset/tame-points-work.md +11 -0
  14. package/.changeset/tender-swans-flash.md +16 -0
  15. package/.changeset/thick-books-grin.md +5 -0
  16. package/.changeset/tough-rockets-allow.md +5 -0
  17. package/.changeset/tricky-tables-shave.md +5 -0
  18. package/.changeset/warm-ties-sit.md +7 -0
  19. package/CHANGELOG.md +72 -0
  20. package/__cjs/cache/core/cache.cjs +1 -1
  21. package/__cjs/cache/inmemory/entityStore.cjs +3 -3
  22. package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  23. package/__cjs/cache/inmemory/policies.cjs +4 -4
  24. package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
  25. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  26. package/__cjs/config/jest/areCombinedGraphQLErrorsEqual.cjs +3 -1
  27. package/__cjs/config/jest/areCombinedGraphQLErrorsEqual.cjs.map +1 -1
  28. package/__cjs/config/jest/setup.cjs +6 -0
  29. package/__cjs/config/jest/setup.cjs.map +1 -1
  30. package/__cjs/core/ApolloClient.cjs +9 -3
  31. package/__cjs/core/ApolloClient.cjs.map +1 -1
  32. package/__cjs/core/ApolloClient.d.cts +8 -8
  33. package/__cjs/core/LocalState.cjs +2 -2
  34. package/__cjs/core/ObservableQuery.cjs +25 -17
  35. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  36. package/__cjs/core/ObservableQuery.d.cts +6 -6
  37. package/__cjs/core/QueryManager.cjs +78 -47
  38. package/__cjs/core/QueryManager.cjs.map +1 -1
  39. package/__cjs/core/QueryManager.d.cts +6 -6
  40. package/__cjs/core/types.d.cts +56 -2
  41. package/__cjs/errors/CombinedGraphQLErrors.cjs +8 -1
  42. package/__cjs/errors/CombinedGraphQLErrors.cjs.map +1 -1
  43. package/__cjs/errors/CombinedGraphQLErrors.d.cts +7 -2
  44. package/__cjs/invariantErrorCodes.cjs +108 -106
  45. package/__cjs/link/core/ApolloLink.cjs +2 -2
  46. package/__cjs/link/http/checkFetcher.cjs +1 -1
  47. package/__cjs/link/http/createHttpLink.cjs +1 -1
  48. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  49. package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
  50. package/__cjs/link/persisted-queries/index.cjs +2 -2
  51. package/__cjs/link/subscriptions/index.cjs +3 -1
  52. package/__cjs/link/subscriptions/index.cjs.map +1 -1
  53. package/__cjs/link/utils/validateOperation.cjs +1 -1
  54. package/__cjs/masking/maskDefinition.cjs +2 -2
  55. package/__cjs/masking/maskFragment.cjs +2 -2
  56. package/__cjs/masking/maskOperation.cjs +1 -1
  57. package/__cjs/masking/utils.cjs +1 -1
  58. package/__cjs/react/context/ApolloConsumer.cjs +1 -1
  59. package/__cjs/react/context/ApolloContext.cjs +1 -1
  60. package/__cjs/react/context/ApolloContext.cjs.map +1 -1
  61. package/__cjs/react/context/ApolloContext.d.cts +2 -2
  62. package/__cjs/react/context/ApolloProvider.cjs +1 -1
  63. package/__cjs/react/hooks/internal/wrapHook.cjs +26 -5
  64. package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
  65. package/__cjs/react/hooks/internal/wrapHook.d.cts +3 -1
  66. package/__cjs/react/hooks/useApolloClient.cjs +1 -1
  67. package/__cjs/react/hooks/useLazyQuery.cjs +2 -2
  68. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  69. package/__cjs/react/hooks/useLazyQuery.d.cts +4 -4
  70. package/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
  71. package/__cjs/react/hooks/useMutation.cjs +14 -19
  72. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  73. package/__cjs/react/hooks/useMutation.d.cts +4 -4
  74. package/__cjs/react/hooks/useQuery.cjs +82 -187
  75. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  76. package/__cjs/react/hooks/useQuery.d.cts +7 -3
  77. package/__cjs/react/hooks/useSubscription.cjs +8 -57
  78. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  79. package/__cjs/react/hooks/useSubscription.d.cts +6 -42
  80. package/__cjs/react/hooks/useSuspenseQuery.cjs +2 -2
  81. package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
  82. package/__cjs/react/internal/cache/QueryReference.cjs +1 -1
  83. package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
  84. package/__cjs/react/internal/cache/QueryReference.d.cts +3 -3
  85. package/__cjs/react/internal/index.cjs +3 -1
  86. package/__cjs/react/internal/index.cjs.map +1 -1
  87. package/__cjs/react/internal/index.d.cts +1 -0
  88. package/__cjs/react/internal/types.d.cts +2 -2
  89. package/__cjs/react/parser/index.cjs +5 -5
  90. package/__cjs/react/ssr/getDataFromTree.cjs +24 -30
  91. package/__cjs/react/ssr/getDataFromTree.cjs.map +1 -1
  92. package/__cjs/react/ssr/getDataFromTree.d.cts +12 -1
  93. package/__cjs/react/ssr/index.cjs +3 -3
  94. package/__cjs/react/ssr/index.cjs.map +1 -1
  95. package/__cjs/react/ssr/index.d.cts +1 -1
  96. package/__cjs/react/ssr/prerenderStatic.cjs +151 -0
  97. package/__cjs/react/ssr/prerenderStatic.cjs.map +1 -0
  98. package/__cjs/react/ssr/prerenderStatic.d.cts +122 -0
  99. package/__cjs/react/ssr/renderToStringWithData.cjs +11 -5
  100. package/__cjs/react/ssr/renderToStringWithData.cjs.map +1 -1
  101. package/__cjs/react/ssr/renderToStringWithData.d.cts +5 -0
  102. package/__cjs/react/ssr/useSSRQuery.cjs +60 -0
  103. package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -0
  104. package/__cjs/react/ssr/useSSRQuery.d.cts +5 -0
  105. package/__cjs/react/types/deprecated.d.cts +1 -1
  106. package/__cjs/react/types/types.documentation.d.cts +4 -12
  107. package/__cjs/testing/internal/index.cjs +3 -1
  108. package/__cjs/testing/internal/index.cjs.map +1 -1
  109. package/__cjs/testing/internal/index.d.cts +1 -0
  110. package/__cjs/testing/internal/resetApolloContext.cjs +24 -0
  111. package/__cjs/testing/internal/resetApolloContext.cjs.map +1 -0
  112. package/__cjs/testing/internal/resetApolloContext.d.cts +10 -0
  113. package/__cjs/testing/matchers/index.cjs +2 -0
  114. package/__cjs/testing/matchers/index.cjs.map +1 -1
  115. package/__cjs/testing/matchers/toEmitStrictTyped.cjs +42 -0
  116. package/__cjs/testing/matchers/toEmitStrictTyped.cjs.map +1 -0
  117. package/__cjs/testing/matchers/toEmitStrictTyped.d.cts +7 -0
  118. package/__cjs/testing/matchers/toEqualStrictTyped.cjs +2 -20
  119. package/__cjs/testing/matchers/toEqualStrictTyped.cjs.map +1 -1
  120. package/__cjs/testing/matchers/utils/getSerializableProperties.cjs +23 -0
  121. package/__cjs/testing/matchers/utils/getSerializableProperties.cjs.map +1 -0
  122. package/__cjs/testing/matchers/utils/getSerializableProperties.d.cts +2 -0
  123. package/__cjs/utilities/internal/index.cjs +3 -1
  124. package/__cjs/utilities/internal/index.cjs.map +1 -1
  125. package/__cjs/utilities/internal/index.d.cts +1 -0
  126. package/__cjs/utilities/internal/toQueryResult.cjs +13 -0
  127. package/__cjs/utilities/internal/toQueryResult.cjs.map +1 -0
  128. package/__cjs/utilities/internal/toQueryResult.d.cts +3 -0
  129. package/__cjs/version.cjs +1 -1
  130. package/__cjs/version.d.cts +1 -1
  131. package/cache/core/cache.js +1 -1
  132. package/cache/inmemory/entityStore.js +3 -3
  133. package/cache/inmemory/key-extractor.js +1 -1
  134. package/cache/inmemory/policies.js +4 -4
  135. package/cache/inmemory/readFromStore.js +2 -2
  136. package/cache/inmemory/writeToStore.js +4 -4
  137. package/config/jest/areCombinedGraphQLErrorsEqual.js +3 -1
  138. package/config/jest/areCombinedGraphQLErrorsEqual.js.map +1 -1
  139. package/config/jest/setup.js +6 -0
  140. package/config/jest/setup.js.map +1 -1
  141. package/core/ApolloClient.d.ts +8 -8
  142. package/core/ApolloClient.js +9 -3
  143. package/core/ApolloClient.js.map +1 -1
  144. package/core/LocalState.js +2 -2
  145. package/core/ObservableQuery.d.ts +6 -6
  146. package/core/ObservableQuery.js +25 -17
  147. package/core/ObservableQuery.js.map +1 -1
  148. package/core/QueryManager.d.ts +6 -6
  149. package/core/QueryManager.js +80 -49
  150. package/core/QueryManager.js.map +1 -1
  151. package/core/types.d.ts +56 -2
  152. package/errors/CombinedGraphQLErrors.d.ts +7 -2
  153. package/errors/CombinedGraphQLErrors.js +8 -1
  154. package/errors/CombinedGraphQLErrors.js.map +1 -1
  155. package/invariantErrorCodes.js +108 -106
  156. package/link/core/ApolloLink.js +2 -2
  157. package/link/http/checkFetcher.js +1 -1
  158. package/link/http/createHttpLink.js +1 -1
  159. package/link/http/parseAndCheckHttpResponse.js +1 -1
  160. package/link/http/serializeFetchParameter.js +1 -1
  161. package/link/persisted-queries/index.js +2 -2
  162. package/link/subscriptions/index.js +3 -1
  163. package/link/subscriptions/index.js.map +1 -1
  164. package/link/utils/validateOperation.js +1 -1
  165. package/masking/maskDefinition.js +2 -2
  166. package/masking/maskFragment.js +2 -2
  167. package/masking/maskOperation.js +1 -1
  168. package/masking/utils.js +1 -1
  169. package/package.json +1 -1
  170. package/react/context/ApolloConsumer.js +1 -1
  171. package/react/context/ApolloContext.d.ts +2 -2
  172. package/react/context/ApolloContext.js +1 -1
  173. package/react/context/ApolloContext.js.map +1 -1
  174. package/react/context/ApolloProvider.js +1 -1
  175. package/react/hooks/internal/wrapHook.d.ts +3 -1
  176. package/react/hooks/internal/wrapHook.js +24 -5
  177. package/react/hooks/internal/wrapHook.js.map +1 -1
  178. package/react/hooks/useApolloClient.js +1 -1
  179. package/react/hooks/useLazyQuery.d.ts +4 -4
  180. package/react/hooks/useLazyQuery.js +2 -2
  181. package/react/hooks/useLazyQuery.js.map +1 -1
  182. package/react/hooks/useLoadableQuery.js +2 -2
  183. package/react/hooks/useMutation.d.ts +4 -4
  184. package/react/hooks/useMutation.js +14 -19
  185. package/react/hooks/useMutation.js.map +1 -1
  186. package/react/hooks/useQuery.d.ts +7 -3
  187. package/react/hooks/useQuery.js +83 -188
  188. package/react/hooks/useQuery.js.map +1 -1
  189. package/react/hooks/useSubscription.d.ts +6 -42
  190. package/react/hooks/useSubscription.js +7 -53
  191. package/react/hooks/useSubscription.js.map +1 -1
  192. package/react/hooks/useSuspenseQuery.js +2 -2
  193. package/react/hooks/useSyncExternalStore.js +1 -1
  194. package/react/internal/cache/QueryReference.d.ts +3 -3
  195. package/react/internal/cache/QueryReference.js +1 -1
  196. package/react/internal/cache/QueryReference.js.map +1 -1
  197. package/react/internal/index.d.ts +1 -0
  198. package/react/internal/index.js +2 -1
  199. package/react/internal/index.js.map +1 -1
  200. package/react/internal/types.d.ts +2 -2
  201. package/react/parser/index.js +5 -5
  202. package/react/ssr/getDataFromTree.d.ts +12 -1
  203. package/react/ssr/getDataFromTree.js +24 -29
  204. package/react/ssr/getDataFromTree.js.map +1 -1
  205. package/react/ssr/index.d.ts +1 -1
  206. package/react/ssr/index.js +1 -1
  207. package/react/ssr/index.js.map +1 -1
  208. package/react/ssr/prerenderStatic.d.ts +122 -0
  209. package/react/ssr/prerenderStatic.js +147 -0
  210. package/react/ssr/prerenderStatic.js.map +1 -0
  211. package/react/ssr/renderToStringWithData.d.ts +5 -0
  212. package/react/ssr/renderToStringWithData.js +11 -5
  213. package/react/ssr/renderToStringWithData.js.map +1 -1
  214. package/react/ssr/useSSRQuery.d.ts +5 -0
  215. package/react/ssr/useSSRQuery.js +56 -0
  216. package/react/ssr/useSSRQuery.js.map +1 -0
  217. package/react/types/deprecated.d.ts +1 -1
  218. package/react/types/types.documentation.d.ts +4 -12
  219. package/testing/internal/index.d.ts +1 -0
  220. package/testing/internal/index.js +2 -1
  221. package/testing/internal/index.js.map +1 -1
  222. package/testing/internal/resetApolloContext.d.ts +10 -0
  223. package/testing/internal/resetApolloContext.js +20 -0
  224. package/testing/internal/resetApolloContext.js.map +1 -0
  225. package/testing/matchers/index.js +2 -0
  226. package/testing/matchers/index.js.map +1 -1
  227. package/testing/matchers/toEmitStrictTyped.d.ts +7 -0
  228. package/testing/matchers/toEmitStrictTyped.js +38 -0
  229. package/testing/matchers/toEmitStrictTyped.js.map +1 -0
  230. package/testing/matchers/toEqualStrictTyped.js +1 -19
  231. package/testing/matchers/toEqualStrictTyped.js.map +1 -1
  232. package/testing/matchers/utils/getSerializableProperties.d.ts +2 -0
  233. package/testing/matchers/utils/getSerializableProperties.js +20 -0
  234. package/testing/matchers/utils/getSerializableProperties.js.map +1 -0
  235. package/utilities/internal/index.d.ts +1 -0
  236. package/utilities/internal/index.js +2 -1
  237. package/utilities/internal/index.js.map +1 -1
  238. package/utilities/internal/toQueryResult.d.ts +3 -0
  239. package/utilities/internal/toQueryResult.js +10 -0
  240. package/utilities/internal/toQueryResult.js.map +1 -0
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. package/__cjs/react/ssr/RenderPromises.cjs +0 -104
  244. package/__cjs/react/ssr/RenderPromises.cjs.map +0 -1
  245. package/__cjs/react/ssr/RenderPromises.d.cts +0 -25
  246. package/__cjs/utilities/types/TODO.cjs +0 -3
  247. package/__cjs/utilities/types/TODO.cjs.map +0 -1
  248. package/__cjs/utilities/types/TODO.d.cts +0 -3
  249. package/react/ssr/RenderPromises.d.ts +0 -25
  250. package/react/ssr/RenderPromises.js +0 -100
  251. package/react/ssr/RenderPromises.js.map +0 -1
  252. package/utilities/types/TODO.d.ts +0 -3
  253. package/utilities/types/TODO.js +0 -2
  254. package/utilities/types/TODO.js.map +0 -1
@@ -122,6 +122,22 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
122
122
  },
123
123
 
124
124
  25: {
125
+ file: "@apollo/client/__cjs/react/ssr/prerenderStatic.cjs",
126
+ condition: "renderCount <= maxRerenders",
127
+
128
+ message: `Exceeded maximum rerender count of %d.
129
+ This either means you have very deep \`useQuery\` waterfalls in your application
130
+ and need to increase the \`maxRerender\` option to \`prerenderStatic\`, or that
131
+ you have an infinite render loop in your application.`
132
+ },
133
+
134
+ 26: {
135
+ file: "@apollo/client/__cjs/react/ssr/prerenderStatic.cjs",
136
+ condition: "!signal?.aborted",
137
+ message: "The operation was aborted before it could be attempted."
138
+ },
139
+
140
+ 27: {
125
141
  file: "@apollo/client/__cjs/react/parser/index.cjs",
126
142
  condition: "!!document && !!document.kind",
127
143
 
@@ -130,7 +146,7 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
130
146
  `to convert your operation into a document`
131
147
  },
132
148
 
133
- 26: {
149
+ 28: {
134
150
  file: "@apollo/client/__cjs/react/parser/index.cjs",
135
151
  condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
136
152
 
@@ -138,7 +154,7 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
138
154
  `You must include a query, subscription or mutation as well`
139
155
  },
140
156
 
141
- 27: {
157
+ 29: {
142
158
  file: "@apollo/client/__cjs/react/parser/index.cjs",
143
159
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
144
160
 
@@ -148,7 +164,7 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
148
164
  `You can use 'compose' to join multiple operation types to a component`
149
165
  },
150
166
 
151
- 28: {
167
+ 30: {
152
168
  file: "@apollo/client/__cjs/react/parser/index.cjs",
153
169
  condition: "definitions.length === 1",
154
170
 
@@ -157,19 +173,19 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
157
173
  `You can use 'compose' to join multiple operation types to a component`
158
174
  },
159
175
 
160
- 29: {
176
+ 31: {
161
177
  file: "@apollo/client/__cjs/react/parser/index.cjs",
162
178
  condition: "operation.type === type",
163
179
  message: `Running a %s requires a graphql ` + `%s, but a %s was used instead.`
164
180
  },
165
181
 
166
- 30: {
182
+ 32: {
167
183
  file: "@apollo/client/__cjs/react/internal/cache/QueryReference.cjs",
168
184
  condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",
169
185
  message: "Expected a QueryRef object, but got something else instead."
170
186
  },
171
187
 
172
- 31: {
188
+ 33: {
173
189
  file: "@apollo/client/__cjs/react/hooks/useApolloClient.cjs",
174
190
  condition: "!!client",
175
191
 
@@ -178,43 +194,43 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
178
194
  "instance in via options."
179
195
  },
180
196
 
181
- 32: {
197
+ 34: {
182
198
  file: "@apollo/client/__cjs/react/hooks/useLazyQuery.cjs",
183
199
  condition: "resultRef.current",
184
200
  message: "useLazyQuery: '%s' cannot be called before executing the query."
185
201
  },
186
202
 
187
- 33: {
203
+ 35: {
188
204
  file: "@apollo/client/__cjs/react/hooks/useLazyQuery.cjs",
189
205
  condition: "!calledDuringRender()",
190
206
  message: "useLazyQuery: 'execute' should not be called during render. To start a query during render, use the 'useQuery' hook."
191
207
  },
192
208
 
193
- 34: {
209
+ 36: {
194
210
  file: "@apollo/client/__cjs/react/hooks/useLoadableQuery.cjs",
195
211
  condition: "!calledDuringRender()",
196
212
  message: "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook."
197
213
  },
198
214
 
199
- 35: {
215
+ 37: {
200
216
  file: "@apollo/client/__cjs/react/hooks/useLoadableQuery.cjs",
201
217
  condition: "internalQueryRef",
202
218
  message: "The query has not been loaded. Please load the query."
203
219
  },
204
220
 
205
- 40: {
221
+ 38: {
206
222
  file: "@apollo/client/__cjs/react/hooks/useSubscription.cjs",
207
223
  condition: "!optionsRef.current.skip",
208
224
  message: "A subscription that is skipped cannot be restarted."
209
225
  },
210
226
 
211
- 41: {
227
+ 39: {
212
228
  file: "@apollo/client/__cjs/react/hooks/useSuspenseQuery.cjs",
213
229
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
214
230
  message: `The fetch policy \`%s\` is not supported with suspense.`
215
231
  },
216
232
 
217
- 44: {
233
+ 42: {
218
234
  file: "@apollo/client/__cjs/react/context/ApolloConsumer.cjs",
219
235
  condition: "context && context.client",
220
236
 
@@ -222,7 +238,7 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
222
238
  "Wrap the root component in an <ApolloProvider>."
223
239
  },
224
240
 
225
- 45: {
241
+ 43: {
226
242
  file: "@apollo/client/__cjs/react/context/ApolloContext.cjs",
227
243
  condition: "\"createContext\" in React",
228
244
 
@@ -233,7 +249,7 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
233
249
  "For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components"
234
250
  },
235
251
 
236
- 46: {
252
+ 44: {
237
253
  file: "@apollo/client/__cjs/react/context/ApolloProvider.cjs",
238
254
  condition: "context.client",
239
255
 
@@ -241,36 +257,36 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
241
257
  'sure you pass in your client via the "client" prop.'
242
258
  },
243
259
 
244
- 47: {
260
+ 45: {
245
261
  file: "@apollo/client/__cjs/masking/maskDefinition.cjs",
246
262
  condition: "fragment",
247
263
  message: "Could not find fragment with name '%s'."
248
264
  },
249
265
 
250
- 49: {
266
+ 47: {
251
267
  file: "@apollo/client/__cjs/masking/maskFragment.cjs",
252
268
  condition: "fragments.length === 1",
253
269
  message: `Found %s fragments. \`fragmentName\` must be provided when there is not exactly 1 fragment.`
254
270
  },
255
271
 
256
- 50: {
272
+ 48: {
257
273
  file: "@apollo/client/__cjs/masking/maskFragment.cjs",
258
274
  condition: "!!fragment",
259
275
  message: `Could not find fragment with name "%s".`
260
276
  },
261
277
 
262
- 51: {
278
+ 49: {
263
279
  file: "@apollo/client/__cjs/masking/maskOperation.cjs",
264
280
  condition: "definition",
265
281
  message: "Expected a parsed GraphQL document with a query, mutation, or subscription."
266
282
  },
267
283
 
268
- 53: {
284
+ 51: {
269
285
  file: "@apollo/client/__cjs/link/utils/validateOperation.cjs",
270
286
  message: `illegal argument: %s`
271
287
  },
272
288
 
273
- 54: {
289
+ 52: {
274
290
  file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
275
291
  condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
276
292
 
@@ -279,13 +295,13 @@ string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql`
279
295
  "parameter."
280
296
  },
281
297
 
282
- 55: {
298
+ 53: {
283
299
  file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
284
300
  condition: "forward",
285
301
  message: "PersistedQueryLink cannot be the last link in the chain."
286
302
  },
287
303
 
288
- 56: {
304
+ 54: {
289
305
  file: "@apollo/client/__cjs/link/http/checkFetcher.cjs",
290
306
  condition: "fetcher || typeof fetch !== \"undefined\"",
291
307
 
@@ -303,23 +319,23 @@ const client = new ApolloClient({
303
319
  `
304
320
  },
305
321
 
306
- 58: {
322
+ 56: {
307
323
  file: "@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs",
308
324
  condition: "response.body && typeof response.body.getReader === \"function\"",
309
325
  message: "Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`."
310
326
  },
311
327
 
312
- 59: {
328
+ 57: {
313
329
  file: "@apollo/client/__cjs/link/http/serializeFetchParameter.cjs",
314
330
  message: `Network request failed. %s is not serializable: %s`
315
331
  },
316
332
 
317
- 61: {
333
+ 59: {
318
334
  file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
319
335
  message: "request is not implemented"
320
336
  },
321
337
 
322
- 62: {
338
+ 60: {
323
339
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
324
340
 
325
341
  message: "To initialize Apollo Client, you must specify a 'cache' property " +
@@ -327,7 +343,7 @@ const client = new ApolloClient({
327
343
  "For more information, please visit: https://go.apollo.dev/c/docs"
328
344
  },
329
345
 
330
- 63: {
346
+ 61: {
331
347
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
332
348
  condition: "options.fetchPolicy !== \"cache-and-network\"",
333
349
 
@@ -337,130 +353,136 @@ const client = new ApolloClient({
337
353
  "using a different fetchPolicy, such as cache-first or network-only."
338
354
  },
339
355
 
356
+ 62: {
357
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
358
+ condition: "options.query",
359
+
360
+ message: "query option is required. You must specify your GraphQL document " +
361
+ "in the query option."
362
+ },
363
+
364
+ 63: {
365
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
366
+ condition: "options.query.kind === \"Document\"",
367
+ message: 'You must wrap the query string in a "gql" tag.'
368
+ },
369
+
370
+ 64: {
371
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
372
+ condition: "!options.returnPartialData",
373
+ message: "returnPartialData option only supported on watchQuery."
374
+ },
375
+
340
376
  65: {
377
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
378
+ condition: "!options.pollInterval",
379
+ message: "pollInterval option only supported on watchQuery."
380
+ },
381
+
382
+ 67: {
341
383
  file: "@apollo/client/__cjs/core/LocalState.cjs",
342
384
  condition: "fragment",
343
385
  message: `No fragment named %s`
344
386
  },
345
387
 
346
- 66: {
388
+ 68: {
347
389
  file: "@apollo/client/__cjs/core/LocalState.cjs",
348
390
  condition: "fragment",
349
391
  message: `No fragment named %s`
350
392
  },
351
393
 
352
- 68: {
394
+ 70: {
353
395
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
354
396
  condition: "updateQuery",
355
397
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
356
398
  },
357
399
 
358
- 70: {
400
+ 72: {
359
401
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
360
402
  condition: "pollInterval",
361
403
  message: "Attempted to start a polling query without a polling interval."
362
404
  },
363
405
 
364
- 72: {
406
+ 74: {
365
407
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
366
408
  message: "QueryManager stopped while query was in flight"
367
409
  },
368
410
 
369
- 73: {
411
+ 75: {
370
412
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
371
413
  condition: "mutation",
372
414
  message: "mutation option is required. You must specify your GraphQL document in the mutation option."
373
415
  },
374
416
 
375
- 74: {
417
+ 76: {
376
418
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
377
419
  condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
378
420
  message: "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."
379
421
  },
380
422
 
381
- 75: {
382
- file: "@apollo/client/__cjs/core/QueryManager.cjs",
383
- condition: "options.query",
384
-
385
- message: "query option is required. You must specify your GraphQL document " +
386
- "in the query option."
387
- },
388
-
389
- 76: {
390
- file: "@apollo/client/__cjs/core/QueryManager.cjs",
391
- condition: "options.query.kind === \"Document\"",
392
- message: 'You must wrap the query string in a "gql" tag.'
393
- },
394
-
395
423
  77: {
396
424
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
397
- condition: "!options.returnPartialData",
398
- message: "returnPartialData option only supported on watchQuery."
399
- },
400
-
401
- 78: {
402
- file: "@apollo/client/__cjs/core/QueryManager.cjs",
403
- condition: "!options.pollInterval",
404
- message: "pollInterval option only supported on watchQuery."
425
+ message: "Store reset while query was in flight (not completed in link chain)"
405
426
  },
406
427
 
407
- 79: {
428
+ 81: {
408
429
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
409
- message: "Store reset while query was in flight (not completed in link chain)"
430
+ condition: "didEmitValue",
431
+ message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
410
432
  },
411
433
 
412
- 83: {
434
+ 82: {
413
435
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
414
436
  condition: "typeof dataId === \"string\"",
415
437
  message: "store.merge expects a string ID"
416
438
  },
417
439
 
418
- 86: {
440
+ 85: {
419
441
  file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
420
442
  condition: "extracted !== void 0",
421
443
  message: `Missing field '%s' while extracting keyFields from %s`
422
444
  },
423
445
 
424
- 87: {
446
+ 86: {
425
447
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
426
448
  condition: "!old || old === which",
427
449
  message: `Cannot change root %s __typename more than once`
428
450
  },
429
451
 
430
- 90: {
452
+ 89: {
431
453
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
432
454
  message: "Cannot automatically merge arrays"
433
455
  },
434
456
 
435
- 91: {
457
+ 90: {
436
458
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
437
459
  message: `No fragment named %s`
438
460
  },
439
461
 
440
- 92: {
462
+ 91: {
441
463
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
442
464
  condition: "!(0, utilities_1.isReference)(value)",
443
465
  message: `Missing selection set for object of type %s returned for query field %s`
444
466
  },
445
467
 
446
- 93: {
468
+ 92: {
447
469
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
448
470
  message: `Could not identify object %s`
449
471
  },
450
472
 
451
- 95: {
473
+ 94: {
452
474
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
453
475
  message: `No fragment named %s`
454
476
  }
455
477
  };
456
478
 
457
479
  export const devDebug = {
458
- 64: {
480
+ 66: {
459
481
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
460
482
  message: `In client.refetchQueries, Promise.all promise rejected with error %o`
461
483
  },
462
484
 
463
- 71: {
485
+ 73: {
464
486
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
465
487
  message: `Missing cache result fields: %o`
466
488
  }
@@ -491,74 +513,54 @@ export const devWarn = {
491
513
  "You may want to use the key parameter to specify a store key."
492
514
  },
493
515
 
494
- 36: {
495
- file: "@apollo/client/__cjs/react/hooks/useSubscription.cjs",
496
- message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
497
- },
498
-
499
- 37: {
500
- file: "@apollo/client/__cjs/react/hooks/useSubscription.cjs",
501
- message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
502
- },
503
-
504
- 38: {
505
- file: "@apollo/client/__cjs/react/hooks/useSubscription.cjs",
506
- message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
507
- },
508
-
509
- 39: {
510
- file: "@apollo/client/__cjs/react/hooks/useSubscription.cjs",
511
- message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
512
- },
513
-
514
- 42: {
516
+ 40: {
515
517
  file: "@apollo/client/__cjs/react/hooks/useSuspenseQuery.cjs",
516
518
  message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."
517
519
  },
518
520
 
519
- 48: {
521
+ 46: {
520
522
  file: "@apollo/client/__cjs/masking/maskDefinition.cjs",
521
523
  message: "Accessing unmasked field on %s at path '%s'. This field will not be available when masking is enabled. Please read the field from the fragment instead."
522
524
  },
523
525
 
524
- 52: {
526
+ 50: {
525
527
  file: "@apollo/client/__cjs/masking/utils.cjs",
526
528
  message: "The configured cache does not support data masking which effectively disables it. Please use a cache that supports data masking or disable data masking to silence this warning."
527
529
  },
528
530
 
529
- 57: {
531
+ 55: {
530
532
  file: "@apollo/client/__cjs/link/http/createHttpLink.cjs",
531
533
  message: "Multipart-subscriptions do not support @defer"
532
534
  },
533
535
 
534
- 60: {
536
+ 58: {
535
537
  file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
536
538
  message: `You are calling concat on a terminating link, which will have no effect %o`
537
539
  },
538
540
 
539
- 67: {
541
+ 69: {
540
542
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
541
543
 
542
544
  message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
543
545
  Did you mean to call refetch(variables) instead of refetch({ variables })?`
544
546
  },
545
547
 
546
- 80: {
548
+ 78: {
547
549
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
548
550
  message: `Unknown query named "%s" requested in refetchQueries options.include array`
549
551
  },
550
552
 
551
- 81: {
553
+ 79: {
552
554
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
553
555
  message: `Unknown anonymous query requested in refetchQueries options.include array`
554
556
  },
555
557
 
556
- 82: {
558
+ 80: {
557
559
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
558
560
  message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy "no-cache". Please add `@unmask` to each fragment spread to access the data.'
559
561
  },
560
562
 
561
- 84: {
563
+ 83: {
562
564
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
563
565
 
564
566
  message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
@@ -566,24 +568,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
566
568
  "`toReference(object, true)`"
567
569
  },
568
570
 
569
- 85: {
571
+ 84: {
570
572
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
571
573
 
572
574
  message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
573
575
  "Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
574
576
  },
575
577
 
576
- 88: {
578
+ 87: {
577
579
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
578
580
  message: `Inferring subtype %s of supertype %s`
579
581
  },
580
582
 
581
- 89: {
583
+ 88: {
582
584
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
583
585
  message: `Undefined 'from' passed to readField with arguments %s`
584
586
  },
585
587
 
586
- 96: {
588
+ 95: {
587
589
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
588
590
 
589
591
  message: `Cache data may be lost when replacing the %s field of a %s object.
@@ -602,7 +604,7 @@ For more information about these options, please refer to the documentation:
602
604
  `
603
605
  },
604
606
 
605
- 97: {
607
+ 96: {
606
608
  file: "@apollo/client/__cjs/cache/core/cache.cjs",
607
609
  message: "Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object."
608
610
  }
@@ -614,17 +616,17 @@ export const devError = {
614
616
  message: `Could not find operation or fragment`
615
617
  },
616
618
 
617
- 43: {
619
+ 41: {
618
620
  file: "@apollo/client/__cjs/react/hooks/useSyncExternalStore.cjs",
619
621
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
620
622
  },
621
623
 
622
- 69: {
624
+ 71: {
623
625
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
624
626
  message: "Unhandled GraphQL subscription error"
625
627
  },
626
628
 
627
- 94: {
629
+ 93: {
628
630
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
629
631
  message: `Missing field '%s' while writing result %o`
630
632
  }
@@ -52,7 +52,7 @@ class ApolloLink {
52
52
  static concat(first, second) {
53
53
  const firstLink = toLink(first);
54
54
  if (isTerminating(firstLink)) {
55
- __DEV__ && invariant_1.invariant.warn(60, firstLink);
55
+ __DEV__ && invariant_1.invariant.warn(58, firstLink);
56
56
  return firstLink;
57
57
  }
58
58
  const nextLink = toLink(second);
@@ -81,7 +81,7 @@ class ApolloLink {
81
81
  return ApolloLink.concat(this, next);
82
82
  }
83
83
  request(operation, forward) {
84
- throw (0, invariant_1.newInvariantError)(61);
84
+ throw (0, invariant_1.newInvariantError)(59);
85
85
  }
86
86
  onError(error, observer) {
87
87
  if (observer && observer.error) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkFetcher = void 0;
4
4
  const invariant_1 = require("@apollo/client/utilities/invariant");
5
5
  const checkFetcher = (fetcher) => {
6
- (0, invariant_1.invariant)(fetcher || typeof fetch !== "undefined", 56);
6
+ (0, invariant_1.invariant)(fetcher || typeof fetch !== "undefined", 54);
7
7
  };
8
8
  exports.checkFetcher = checkFetcher;
9
9
  //# sourceMappingURL=checkFetcher.cjs.map
@@ -97,7 +97,7 @@ const createHttpLink = (linkOptions = {}) => {
97
97
  // Omit defer-specific headers if the user attempts to defer a selection
98
98
  // set on a subscription and log a warning.
99
99
  if (isSubscription && hasDefer) {
100
- __DEV__ && invariant_1.invariant.warn(57);
100
+ __DEV__ && invariant_1.invariant.warn(55);
101
101
  }
102
102
  if (isSubscription) {
103
103
  acceptHeader +=
@@ -27,7 +27,7 @@ async function readMultipartBody(response, nextValue) {
27
27
  : "-";
28
28
  const boundary = `\r\n--${boundaryVal}`;
29
29
  let buffer = "";
30
- (0, invariant_1.invariant)(response.body && typeof response.body.getReader === "function", 58);
30
+ (0, invariant_1.invariant)(response.body && typeof response.body.getReader === "function", 56);
31
31
  const iterator = response.body.getReader();
32
32
  let running = true;
33
33
  while (running) {
@@ -8,7 +8,7 @@ const serializeFetchParameter = (p, label) => {
8
8
  serialized = JSON.stringify(p);
9
9
  }
10
10
  catch (e) {
11
- const parseError = (0, invariant_1.newInvariantError)(59, label, e.message);
11
+ const parseError = (0, invariant_1.newInvariantError)(57, label, e.message);
12
12
  parseError.parseError = e;
13
13
  throw parseError;
14
14
  }
@@ -46,7 +46,7 @@ const createPersistedQueryLink = (options) => {
46
46
  // hashing with something other than SHA-256.
47
47
  (0, invariant_1.invariant)(options &&
48
48
  (typeof options.sha256 === "function" ||
49
- typeof options.generateHash === "function"), 54);
49
+ typeof options.generateHash === "function"), 52);
50
50
  const { sha256,
51
51
  // If both a `sha256` and `generateHash` option are provided, the
52
52
  // `sha256` option will be ignored. Developers can configure and
@@ -72,7 +72,7 @@ const createPersistedQueryLink = (options) => {
72
72
  return hash;
73
73
  }
74
74
  return Object.assign(new core_1.ApolloLink((operation, forward) => {
75
- (0, invariant_1.invariant)(forward, 55);
75
+ (0, invariant_1.invariant)(forward, 53);
76
76
  const { query } = operation;
77
77
  return new rxjs_1.Observable((observer) => {
78
78
  let subscription;
@@ -64,7 +64,9 @@ class GraphQLWsLink extends core_1.ApolloLink {
64
64
  // reason will be available on clean closes
65
65
  new Error(`Socket closed${likeClose ? ` with event ${err.code}` : ""}${likeClose ? ` ${err.reason}` : ""}`));
66
66
  }
67
- return observer.error(new errors_1.CombinedGraphQLErrors(Array.isArray(err) ? err : [err]));
67
+ return observer.error(new errors_1.CombinedGraphQLErrors({
68
+ errors: Array.isArray(err) ? err : [err],
69
+ }));
68
70
  },
69
71
  // casting around a wrong type in graphql-ws, which incorrectly expects `Sink<ExecutionResult>`
70
72
  });