@apollo/client 3.13.8 → 3.14.0-alpha.0

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 (182) hide show
  1. package/.changeset/chilled-cameras-scream.md +5 -0
  2. package/.changeset/great-suns-cover.md +5 -0
  3. package/.changeset/perfect-donuts-roll.md +5 -0
  4. package/.changeset/popular-waves-drop.md +5 -0
  5. package/.changeset/pre.json +16 -0
  6. package/.changeset/shy-dragons-tease.md +5 -0
  7. package/.changeset/smooth-countries-cough.md +5 -0
  8. package/.changeset/spotty-walls-repair.md +5 -0
  9. package/CHANGELOG.md +20 -0
  10. package/README.md +80 -31
  11. package/apollo-client.cjs +354 -132
  12. package/apollo-client.cjs.map +1 -1
  13. package/apollo-client.min.cjs +1 -1
  14. package/cache/cache.cjs +78 -21
  15. package/cache/cache.cjs.map +1 -1
  16. package/cache/cache.cjs.native.js +78 -21
  17. package/cache/core/cache.js +27 -4
  18. package/cache/core/cache.js.map +1 -1
  19. package/cache/core/types/Cache.d.ts +4 -4
  20. package/cache/core/types/Cache.js.map +1 -1
  21. package/cache/core/types/DataProxy.d.ts +2 -2
  22. package/cache/inmemory/inMemoryCache.js +15 -4
  23. package/cache/inmemory/inMemoryCache.js.map +1 -1
  24. package/cache/inmemory/policies.js +18 -13
  25. package/cache/inmemory/policies.js.map +1 -1
  26. package/cache/inmemory/readFromStore.d.ts +7 -0
  27. package/cache/inmemory/readFromStore.js.map +1 -1
  28. package/cache/inmemory/types.d.ts +14 -3
  29. package/cache/inmemory/types.js.map +1 -1
  30. package/core/ApolloClient.d.ts +191 -2
  31. package/core/ApolloClient.js +93 -7
  32. package/core/ApolloClient.js.map +1 -1
  33. package/core/LocalState.js +2 -2
  34. package/core/ObservableQuery.js +10 -6
  35. package/core/ObservableQuery.js.map +1 -1
  36. package/core/QueryInfo.js +8 -2
  37. package/core/QueryInfo.js.map +1 -1
  38. package/core/QueryManager.js +15 -12
  39. package/core/QueryManager.js.map +1 -1
  40. package/core/core.cjs +93 -30
  41. package/core/core.cjs.map +1 -1
  42. package/core/core.cjs.native.js +93 -30
  43. package/core/watchQueryOptions.d.ts +2 -2
  44. package/dev/dev.cjs +144 -84
  45. package/dev/dev.cjs.map +1 -1
  46. package/dev/dev.cjs.native.js +144 -84
  47. package/invariantErrorCodes.js +158 -83
  48. package/link/core/ApolloLink.js +2 -2
  49. package/link/core/core.cjs +2 -2
  50. package/link/core/core.cjs.map +1 -1
  51. package/link/core/core.cjs.native.js +2 -2
  52. package/link/http/checkFetcher.js +1 -1
  53. package/link/http/createHttpLink.js +1 -1
  54. package/link/http/http.cjs +3 -3
  55. package/link/http/http.cjs.map +1 -1
  56. package/link/http/http.cjs.native.js +3 -3
  57. package/link/http/serializeFetchParameter.js +1 -1
  58. package/link/persisted-queries/index.js +2 -2
  59. package/link/persisted-queries/persisted-queries.cjs +2 -2
  60. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  61. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  62. package/link/utils/toPromise.js +1 -1
  63. package/link/utils/utils.cjs +2 -2
  64. package/link/utils/utils.cjs.map +1 -1
  65. package/link/utils/utils.cjs.native.js +2 -2
  66. package/link/utils/validateOperation.js +1 -1
  67. package/masking/maskDefinition.js +2 -2
  68. package/masking/maskFragment.js +2 -2
  69. package/masking/maskOperation.js +1 -1
  70. package/masking/masking.cjs +6 -6
  71. package/masking/masking.cjs.map +1 -1
  72. package/masking/masking.cjs.native.js +6 -6
  73. package/masking/utils.js +1 -1
  74. package/package.json +1 -1
  75. package/react/components/Mutation.js +5 -0
  76. package/react/components/Mutation.js.map +1 -1
  77. package/react/components/Query.js +5 -0
  78. package/react/components/Query.js.map +1 -1
  79. package/react/components/Subscription.js +5 -0
  80. package/react/components/Subscription.js.map +1 -1
  81. package/react/components/components.cjs +34 -0
  82. package/react/components/components.cjs.map +1 -1
  83. package/react/components/components.cjs.native.js +34 -0
  84. package/react/context/ApolloConsumer.js +1 -1
  85. package/react/context/ApolloContext.js +7 -2
  86. package/react/context/ApolloContext.js.map +1 -1
  87. package/react/context/ApolloProvider.js +1 -1
  88. package/react/context/context.cjs +9 -4
  89. package/react/context/context.cjs.map +1 -1
  90. package/react/context/context.cjs.native.js +9 -4
  91. package/react/hoc/graphql.js +17 -4
  92. package/react/hoc/graphql.js.map +1 -1
  93. package/react/hoc/hoc-utils.js +1 -1
  94. package/react/hoc/hoc.cjs +55 -9
  95. package/react/hoc/hoc.cjs.map +1 -1
  96. package/react/hoc/hoc.cjs.native.js +55 -9
  97. package/react/hoc/mutation-hoc.js +8 -1
  98. package/react/hoc/mutation-hoc.js.map +1 -1
  99. package/react/hoc/query-hoc.js +8 -1
  100. package/react/hoc/query-hoc.js.map +1 -1
  101. package/react/hoc/subscription-hoc.js +8 -1
  102. package/react/hoc/subscription-hoc.js.map +1 -1
  103. package/react/hoc/withApollo.js +1 -1
  104. package/react/hooks/hooks.cjs +264 -31
  105. package/react/hooks/hooks.cjs.map +1 -1
  106. package/react/hooks/hooks.cjs.native.js +264 -31
  107. package/react/hooks/internal/index.d.ts +2 -0
  108. package/react/hooks/internal/index.js +2 -0
  109. package/react/hooks/internal/index.js.map +1 -1
  110. package/react/hooks/internal/useWarnRemoved.d.ts +2 -0
  111. package/react/hooks/internal/useWarnRemoved.js +14 -0
  112. package/react/hooks/internal/useWarnRemoved.js.map +1 -0
  113. package/react/hooks/internal/useWarnRemovedOption.d.ts +2 -0
  114. package/react/hooks/internal/useWarnRemovedOption.js +14 -0
  115. package/react/hooks/internal/useWarnRemovedOption.js.map +1 -0
  116. package/react/hooks/useApolloClient.js +1 -1
  117. package/react/hooks/useBackgroundQuery.js +11 -3
  118. package/react/hooks/useBackgroundQuery.js.map +1 -1
  119. package/react/hooks/useFragment.js +30 -21
  120. package/react/hooks/useFragment.js.map +1 -1
  121. package/react/hooks/useLazyQuery.js +65 -0
  122. package/react/hooks/useLazyQuery.js.map +1 -1
  123. package/react/hooks/useLoadableQuery.js +12 -5
  124. package/react/hooks/useLoadableQuery.js.map +1 -1
  125. package/react/hooks/useMutation.js +5 -1
  126. package/react/hooks/useMutation.js.map +1 -1
  127. package/react/hooks/useQuery.d.ts +2 -2
  128. package/react/hooks/useQuery.js +25 -7
  129. package/react/hooks/useQuery.js.map +1 -1
  130. package/react/hooks/useSubscription.js +3 -3
  131. package/react/hooks/useSubscription.js.map +1 -1
  132. package/react/hooks/useSuspenseQuery.js +12 -6
  133. package/react/hooks/useSuspenseQuery.js.map +1 -1
  134. package/react/hooks/useSyncExternalStore.js +1 -1
  135. package/react/internal/cache/QueryReference.d.ts +16 -0
  136. package/react/internal/cache/QueryReference.js +1 -1
  137. package/react/internal/cache/QueryReference.js.map +1 -1
  138. package/react/internal/internal.cjs +2 -2
  139. package/react/internal/internal.cjs.map +1 -1
  140. package/react/internal/internal.cjs.native.js +2 -2
  141. package/react/parser/index.d.ts +7 -0
  142. package/react/parser/index.js +17 -7
  143. package/react/parser/index.js.map +1 -1
  144. package/react/parser/parser.cjs +28 -7
  145. package/react/parser/parser.cjs.map +1 -1
  146. package/react/parser/parser.cjs.native.js +28 -7
  147. package/react/query-preloader/createQueryPreloader.d.ts +2 -1
  148. package/react/query-preloader/createQueryPreloader.js +14 -5
  149. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  150. package/react/react.cjs +40 -6
  151. package/react/react.cjs.map +1 -1
  152. package/react/react.cjs.native.js +40 -6
  153. package/react/types/types.d.ts +303 -9
  154. package/react/types/types.documentation.d.ts +2 -3
  155. package/react/types/types.documentation.js.map +1 -1
  156. package/react/types/types.js.map +1 -1
  157. package/testing/core/core.cjs +2 -2
  158. package/testing/core/core.cjs.map +1 -1
  159. package/testing/core/core.cjs.native.js +2 -2
  160. package/testing/core/mocking/mockLink.js +2 -2
  161. package/testing/react/MockedProvider.d.ts +27 -1
  162. package/testing/react/MockedProvider.js +16 -10
  163. package/testing/react/MockedProvider.js.map +1 -1
  164. package/testing/testing.cjs +42 -11
  165. package/testing/testing.cjs.map +1 -1
  166. package/testing/testing.cjs.native.js +42 -11
  167. package/utilities/deprecation/index.d.ts +11 -0
  168. package/utilities/deprecation/index.js +28 -0
  169. package/utilities/deprecation/index.js.map +1 -0
  170. package/utilities/globals/globals.cjs +1 -1
  171. package/utilities/globals/globals.cjs.map +1 -1
  172. package/utilities/globals/globals.cjs.native.js +1 -1
  173. package/utilities/graphql/DocumentTransform.js +1 -1
  174. package/utilities/graphql/directives.js +7 -7
  175. package/utilities/graphql/fragments.js +3 -3
  176. package/utilities/graphql/getFromAST.js +8 -8
  177. package/utilities/graphql/storeUtils.js +1 -1
  178. package/utilities/graphql/transform.js +2 -2
  179. package/utilities/utilities.cjs +22 -22
  180. package/utilities/utilities.cjs.map +1 -1
  181. package/utilities/utilities.cjs.native.js +22 -22
  182. package/version.js +1 -1
@@ -49,7 +49,7 @@ const errorCodes =
49
49
  "in the options object. \n" +
50
50
  "For more information, please visit: https://go.apollo.dev/c/docs"
51
51
  },
52
- 17: {
52
+ 18: {
53
53
  file: "@apollo/client/core/ApolloClient.js",
54
54
  condition: "options.fetchPolicy !== \"cache-and-network\"",
55
55
  message: "The cache-and-network fetchPolicy does not work with client.query, because " +
@@ -57,120 +57,120 @@ const errorCodes =
57
57
  "to receive multiple results from the cache and the network, or consider " +
58
58
  "using a different fetchPolicy, such as cache-first or network-only."
59
59
  },
60
- 19: {
60
+ 20: {
61
61
  file: "@apollo/client/core/LocalState.js",
62
62
  condition: "fragment",
63
63
  message: "No fragment named %s"
64
64
  },
65
- 20: {
65
+ 21: {
66
66
  file: "@apollo/client/core/LocalState.js",
67
67
  condition: "fragment",
68
68
  message: "No fragment named %s"
69
69
  },
70
- 22: {
70
+ 23: {
71
71
  file: "@apollo/client/core/ObservableQuery.js",
72
72
  condition: "updateQuery",
73
73
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
74
74
  },
75
- 24: {
75
+ 25: {
76
76
  file: "@apollo/client/core/ObservableQuery.js",
77
77
  condition: "pollInterval",
78
78
  message: "Attempted to start a polling query without a polling interval."
79
79
  },
80
- 27: {
80
+ 28: {
81
81
  file: "@apollo/client/core/QueryManager.js",
82
82
  message: "QueryManager stopped while query was in flight"
83
83
  },
84
- 28: {
84
+ 29: {
85
85
  file: "@apollo/client/core/QueryManager.js",
86
86
  condition: "mutation",
87
87
  message: "mutation option is required. You must specify your GraphQL document in the mutation option."
88
88
  },
89
- 29: {
89
+ 30: {
90
90
  file: "@apollo/client/core/QueryManager.js",
91
91
  condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
92
92
  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."
93
93
  },
94
- 30: {
94
+ 31: {
95
95
  file: "@apollo/client/core/QueryManager.js",
96
96
  condition: "options.query",
97
97
  message: "query option is required. You must specify your GraphQL document " +
98
98
  "in the query option."
99
99
  },
100
- 31: {
100
+ 32: {
101
101
  file: "@apollo/client/core/QueryManager.js",
102
102
  condition: "options.query.kind === \"Document\"",
103
103
  message: 'You must wrap the query string in a "gql" tag.'
104
104
  },
105
- 32: {
105
+ 33: {
106
106
  file: "@apollo/client/core/QueryManager.js",
107
107
  condition: "!options.returnPartialData",
108
108
  message: "returnPartialData option only supported on watchQuery."
109
109
  },
110
- 33: {
110
+ 34: {
111
111
  file: "@apollo/client/core/QueryManager.js",
112
112
  condition: "!options.pollInterval",
113
113
  message: "pollInterval option only supported on watchQuery."
114
114
  },
115
- 34: {
115
+ 35: {
116
116
  file: "@apollo/client/core/QueryManager.js",
117
117
  message: "Store reset while query was in flight (not completed in link chain)"
118
118
  },
119
- 39: {
119
+ 40: {
120
120
  file: "@apollo/client/link/core/ApolloLink.js",
121
121
  message: "request is not implemented"
122
122
  },
123
- 40: {
123
+ 41: {
124
124
  file: "@apollo/client/link/http/checkFetcher.js",
125
125
  message: "\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "
126
126
  },
127
- 42: {
127
+ 43: {
128
128
  file: "@apollo/client/link/http/serializeFetchParameter.js",
129
129
  message: "Network request failed. %s is not serializable: %s"
130
130
  },
131
- 43: {
131
+ 44: {
132
132
  file: "@apollo/client/link/persisted-queries/index.js",
133
133
  condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
134
134
  message: 'Missing/invalid "sha256" or "generateHash" function. Please ' +
135
135
  'configure one using the "createPersistedQueryLink(options)" options ' +
136
136
  "parameter."
137
137
  },
138
- 44: {
138
+ 45: {
139
139
  file: "@apollo/client/link/persisted-queries/index.js",
140
140
  condition: "forward",
141
141
  message: "PersistedQueryLink cannot be the last link in the chain."
142
142
  },
143
- 46: {
143
+ 47: {
144
144
  file: "@apollo/client/link/utils/validateOperation.js",
145
145
  message: "illegal argument: %s"
146
146
  },
147
- 47: {
147
+ 48: {
148
148
  file: "@apollo/client/masking/maskDefinition.js",
149
149
  condition: "fragment",
150
150
  message: "Could not find fragment with name '%s'."
151
151
  },
152
- 49: {
152
+ 50: {
153
153
  file: "@apollo/client/masking/maskFragment.js",
154
154
  condition: "fragments.length === 1",
155
155
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
156
156
  },
157
- 50: {
157
+ 51: {
158
158
  file: "@apollo/client/masking/maskFragment.js",
159
159
  condition: "!!fragment",
160
160
  message: "Could not find fragment with name \"%s\"."
161
161
  },
162
- 51: {
162
+ 52: {
163
163
  file: "@apollo/client/masking/maskOperation.js",
164
164
  condition: "definition",
165
165
  message: "Expected a parsed GraphQL document with a query, mutation, or subscription."
166
166
  },
167
- 53: {
167
+ 57: {
168
168
  file: "@apollo/client/react/context/ApolloConsumer.js",
169
169
  condition: "context && context.client",
170
170
  message: 'Could not find "client" in the context of ApolloConsumer. ' +
171
171
  "Wrap the root component in an <ApolloProvider>."
172
172
  },
173
- 54: {
173
+ 58: {
174
174
  file: "@apollo/client/react/context/ApolloContext.js",
175
175
  condition: "\"createContext\" in React",
176
176
  message: "Invoking `getApolloContext` in an environment where `React.createContext` is not available.\n" +
@@ -178,70 +178,70 @@ const errorCodes =
178
178
  'Please make sure to add "use client" at the top of your file.\n' +
179
179
  "For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components"
180
180
  },
181
- 55: {
181
+ 60: {
182
182
  file: "@apollo/client/react/context/ApolloProvider.js",
183
183
  condition: "context.client",
184
184
  message: "ApolloProvider was not passed a client instance. Make " +
185
185
  'sure you pass in your client via the "client" prop.'
186
186
  },
187
- 56: {
187
+ 62: {
188
188
  file: "@apollo/client/react/hoc/hoc-utils.js",
189
189
  condition: "this.withRef",
190
190
  message: "To access the wrapped instance, you need to specify " +
191
191
  "{ withRef: true } in the options"
192
192
  },
193
- 57: {
193
+ 66: {
194
194
  file: "@apollo/client/react/hoc/withApollo.js",
195
195
  condition: "operationOptions.withRef",
196
196
  message: "To access the wrapped instance, you need to specify " +
197
197
  "{ withRef: true } in the options"
198
198
  },
199
- 58: {
199
+ 68: {
200
200
  file: "@apollo/client/react/hooks/useApolloClient.js",
201
201
  condition: "!!client",
202
202
  message: 'Could not find "client" in the context or passed in as an option. ' +
203
203
  "Wrap the root component in an <ApolloProvider>, or pass an ApolloClient " +
204
204
  "instance in via options."
205
205
  },
206
- 59: {
206
+ 71: {
207
207
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
208
208
  condition: "!calledDuringRender()",
209
209
  message: "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook."
210
210
  },
211
- 60: {
211
+ 72: {
212
212
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
213
213
  condition: "internalQueryRef",
214
214
  message: "The query has not been loaded. Please load the query."
215
215
  },
216
- 65: {
216
+ 78: {
217
217
  file: "@apollo/client/react/hooks/useSubscription.js",
218
218
  condition: "!optionsRef.current.skip",
219
219
  message: "A subscription that is skipped cannot be restarted."
220
220
  },
221
- 66: {
221
+ 79: {
222
222
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
223
223
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
224
224
  message: "The fetch policy `%s` is not supported with suspense."
225
225
  },
226
- 69: {
226
+ 82: {
227
227
  file: "@apollo/client/react/internal/cache/QueryReference.js",
228
228
  condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",
229
229
  message: "Expected a QueryRef object, but got something else instead."
230
230
  },
231
- 70: {
231
+ 84: {
232
232
  file: "@apollo/client/react/parser/index.js",
233
233
  condition: "!!document && !!document.kind",
234
234
  message: "Argument of %s passed to parser was not a valid GraphQL " +
235
235
  "DocumentNode. You may need to use 'graphql-tag' or another method " +
236
236
  "to convert your operation into a document"
237
237
  },
238
- 71: {
238
+ 85: {
239
239
  file: "@apollo/client/react/parser/index.js",
240
240
  condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
241
241
  message: "Passing only a fragment to 'graphql' is not yet supported. " +
242
242
  "You must include a query, subscription or mutation as well"
243
243
  },
244
- 72: {
244
+ 86: {
245
245
  file: "@apollo/client/react/parser/index.js",
246
246
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
247
247
  message: "react-apollo only supports a query, subscription, or a mutation per HOC. " +
@@ -249,107 +249,107 @@ const errorCodes =
249
249
  "subscriptions and %s mutations. " +
250
250
  "You can use 'compose' to join multiple operation types to a component"
251
251
  },
252
- 73: {
252
+ 87: {
253
253
  file: "@apollo/client/react/parser/index.js",
254
254
  condition: "definitions.length === 1",
255
255
  message: "react-apollo only supports one definition per HOC. %s had " +
256
256
  "%s definitions. " +
257
257
  "You can use 'compose' to join multiple operation types to a component"
258
258
  },
259
- 74: {
259
+ 88: {
260
260
  file: "@apollo/client/react/parser/index.js",
261
261
  condition: "operation.type === type",
262
262
  message: "Running a %s requires a graphql " + "%s, but a %s was used instead."
263
263
  },
264
- 75: {
264
+ 89: {
265
265
  file: "@apollo/client/testing/core/mocking/mockLink.js",
266
266
  condition: "queryWithoutClientOnlyDirectives",
267
267
  message: "query is required"
268
268
  },
269
- 76: {
269
+ 90: {
270
270
  file: "@apollo/client/testing/core/mocking/mockLink.js",
271
271
  condition: "mockedResponse.maxUsageCount > 0",
272
272
  message: "Mock response maxUsageCount must be greater than 0, %s given"
273
273
  },
274
- 77: {
274
+ 92: {
275
275
  file: "@apollo/client/utilities/graphql/DocumentTransform.js",
276
276
  condition: "Array.isArray(cacheKeys)",
277
277
  message: "`getCacheKey` must return an array or undefined"
278
278
  },
279
- 78: {
279
+ 93: {
280
280
  file: "@apollo/client/utilities/graphql/directives.js",
281
281
  condition: "evaledValue !== void 0",
282
282
  message: "Invalid variable referenced in @%s directive."
283
283
  },
284
- 79: {
284
+ 94: {
285
285
  file: "@apollo/client/utilities/graphql/directives.js",
286
286
  condition: "directiveArguments && directiveArguments.length === 1",
287
287
  message: "Incorrect number of arguments for the @%s directive."
288
288
  },
289
- 80: {
289
+ 95: {
290
290
  file: "@apollo/client/utilities/graphql/directives.js",
291
291
  condition: "ifArgument.name && ifArgument.name.value === \"if\"",
292
292
  message: "Invalid argument for the @%s directive."
293
293
  },
294
- 81: {
294
+ 96: {
295
295
  file: "@apollo/client/utilities/graphql/directives.js",
296
296
  condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",
297
297
  message: "Argument for the @%s directive must be a variable or a boolean value."
298
298
  },
299
- 85: {
299
+ 100: {
300
300
  file: "@apollo/client/utilities/graphql/fragments.js",
301
301
  message: "Found a %s operation%s. " +
302
302
  "No operations are allowed when using a fragment as a query. Only fragments are allowed."
303
303
  },
304
- 86: {
304
+ 101: {
305
305
  file: "@apollo/client/utilities/graphql/fragments.js",
306
306
  condition: "fragments.length === 1",
307
307
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
308
308
  },
309
- 87: {
309
+ 102: {
310
310
  file: "@apollo/client/utilities/graphql/fragments.js",
311
311
  condition: "fragment",
312
312
  message: "No fragment named %s"
313
313
  },
314
- 88: {
314
+ 103: {
315
315
  file: "@apollo/client/utilities/graphql/getFromAST.js",
316
316
  condition: "doc && doc.kind === \"Document\"",
317
317
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
318
318
  },
319
- 89: {
319
+ 104: {
320
320
  file: "@apollo/client/utilities/graphql/getFromAST.js",
321
321
  message: "Schema type definitions not allowed in queries. Found: \"%s\""
322
322
  },
323
- 90: {
323
+ 105: {
324
324
  file: "@apollo/client/utilities/graphql/getFromAST.js",
325
325
  condition: "operations.length <= 1",
326
326
  message: "Ambiguous GraphQL document: contains %s operations"
327
327
  },
328
- 91: {
328
+ 106: {
329
329
  file: "@apollo/client/utilities/graphql/getFromAST.js",
330
330
  condition: "queryDef && queryDef.operation === \"query\"",
331
331
  message: "Must contain a query definition."
332
332
  },
333
- 92: {
333
+ 107: {
334
334
  file: "@apollo/client/utilities/graphql/getFromAST.js",
335
335
  condition: "doc.kind === \"Document\"",
336
336
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
337
337
  },
338
- 93: {
338
+ 108: {
339
339
  file: "@apollo/client/utilities/graphql/getFromAST.js",
340
340
  condition: "doc.definitions.length <= 1",
341
341
  message: "Fragment must have exactly one definition."
342
342
  },
343
- 94: {
343
+ 109: {
344
344
  file: "@apollo/client/utilities/graphql/getFromAST.js",
345
345
  condition: "fragmentDef.kind === \"FragmentDefinition\"",
346
346
  message: "Must be a fragment definition."
347
347
  },
348
- 95: {
348
+ 110: {
349
349
  file: "@apollo/client/utilities/graphql/getFromAST.js",
350
350
  message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
351
351
  },
352
- 96: {
352
+ 111: {
353
353
  file: "@apollo/client/utilities/graphql/storeUtils.js",
354
354
  message: "The inline argument \"%s\" of kind \"%s\"" +
355
355
  "is not supported. Use variables instead of inline arguments to " +
@@ -357,11 +357,11 @@ const errorCodes =
357
357
  }
358
358
  };
359
359
  const devDebug = {
360
- 18: {
360
+ 19: {
361
361
  file: "@apollo/client/core/ApolloClient.js",
362
362
  message: "In client.refetchQueries, Promise.all promise rejected with error %o"
363
363
  },
364
- 26: {
364
+ 27: {
365
365
  file: "@apollo/client/core/ObservableQuery.js",
366
366
  message: "Missing cache result fields: %o"
367
367
  }
@@ -395,75 +395,135 @@ const devWarn = {
395
395
  file: "@apollo/client/cache/inmemory/writeToStore.js",
396
396
  message: "Cache data may be lost when replacing the %s field of a %s object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\n\n existing: %o\n incoming: %o\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"
397
397
  },
398
- 21: {
398
+ 17: {
399
+ file: "@apollo/client/core/ApolloClient.js",
400
+ message: "[ApolloClient]: Apollo Client 4.0 will require a `link` option and will not create a default link when not provided. Please provide a `link` option."
401
+ },
402
+ 22: {
399
403
  file: "@apollo/client/core/ObservableQuery.js",
400
404
  message: "Called refetch(%o) for query %o, which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"
401
405
  },
402
- 35: {
406
+ 36: {
403
407
  file: "@apollo/client/core/QueryManager.js",
404
408
  message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
405
409
  },
406
- 36: {
410
+ 37: {
407
411
  file: "@apollo/client/core/QueryManager.js",
408
412
  message: "Unknown anonymous query requested in refetchQueries options.include array"
409
413
  },
410
- 37: {
414
+ 38: {
411
415
  file: "@apollo/client/core/QueryManager.js",
412
416
  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.'
413
417
  },
414
- 38: {
418
+ 39: {
415
419
  file: "@apollo/client/link/core/ApolloLink.js",
416
420
  message: "You are calling concat on a terminating link, which will have no effect %o"
417
421
  },
418
- 41: {
422
+ 42: {
419
423
  file: "@apollo/client/link/http/createHttpLink.js",
420
424
  message: "Multipart-subscriptions do not support @defer"
421
425
  },
422
- 45: {
426
+ 46: {
423
427
  file: "@apollo/client/link/utils/toPromise.js",
424
428
  message: "Promise Wrapper does not support multiple results from Observable"
425
429
  },
426
- 48: {
430
+ 49: {
427
431
  file: "@apollo/client/masking/maskDefinition.js",
428
432
  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."
429
433
  },
430
- 52: {
434
+ 53: {
431
435
  file: "@apollo/client/masking/utils.js",
432
436
  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."
433
437
  },
438
+ 54: {
439
+ file: "@apollo/client/react/components/Mutation.js",
440
+ message: "[Mutation]: The `<Mutation />` component is deprecated and will be removed in Apollo Client 4.0. Please use the `useMutation` React hook instead."
441
+ },
442
+ 55: {
443
+ file: "@apollo/client/react/components/Query.js",
444
+ message: "[Query]: The `<Query />` component is deprecated and will be removed in Apollo Client 4.0. Please use an available React hook such as `useQuery` instead."
445
+ },
446
+ 56: {
447
+ file: "@apollo/client/react/components/Subscription.js",
448
+ message: "[Subscription]: The `<Subscription />` component is deprecated and will be removed in Apollo Client 4.0. Please use the `useSubscription` React hook instead."
449
+ },
450
+ 59: {
451
+ file: "@apollo/client/react/context/ApolloContext.js",
452
+ message: "[resetApolloContext]: `resetApolloContext` is deprecated and will be removed in Apollo Client 4.0. Please use `getApolloContext` instead."
453
+ },
434
454
  61: {
455
+ file: "@apollo/client/react/hoc/graphql.js",
456
+ message: "[graphql]: The `graphql` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`, `useMutation`, or `useSubscription`."
457
+ },
458
+ 63: {
459
+ file: "@apollo/client/react/hoc/mutation-hoc.js",
460
+ message: "[withMutation]: The `withMutation` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`."
461
+ },
462
+ 64: {
463
+ file: "@apollo/client/react/hoc/query-hoc.js",
464
+ message: "[withQuery]: The `withQuery` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useQuery`."
465
+ },
466
+ 65: {
467
+ file: "@apollo/client/react/hoc/subscription-hoc.js",
468
+ message: "[withSubscription]: The `withSubscription` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useSubscription`."
469
+ },
470
+ 67: {
471
+ file: "@apollo/client/react/hooks/internal/useWarnRemovedOption.js",
472
+ message: "[%s]: `%s` is a deprecated hook option and will be removed in Apollo Client 4.0. %s"
473
+ },
474
+ 69: {
475
+ file: "@apollo/client/react/hooks/useLazyQuery.js",
476
+ message: "[useLazyQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useLazyQuery` with new options."
477
+ },
478
+ 70: {
479
+ file: "@apollo/client/react/hooks/useLazyQuery.js",
480
+ message: "[useLazyQuery]: Calling `execute` in render will throw in Apollo Client 4.0. Either switch to `useQuery` to run the query during render or move the `execute` call inside of `useEffect`."
481
+ },
482
+ 73: {
483
+ file: "@apollo/client/react/hooks/useQuery.js",
484
+ message: "[useQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useQuery` with new options."
485
+ },
486
+ 74: {
435
487
  file: "@apollo/client/react/hooks/useSubscription.js",
436
488
  message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
437
489
  },
438
- 62: {
490
+ 75: {
439
491
  file: "@apollo/client/react/hooks/useSubscription.js",
440
- message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
492
+ message: "[useSubscription]: `onSubscriptionData` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onData' option instead."
441
493
  },
442
- 63: {
494
+ 76: {
443
495
  file: "@apollo/client/react/hooks/useSubscription.js",
444
496
  message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
445
497
  },
446
- 64: {
498
+ 77: {
447
499
  file: "@apollo/client/react/hooks/useSubscription.js",
448
- message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
500
+ message: "[useSubscription]: `onSubscriptionComplete` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onComplete' option instead."
449
501
  },
450
- 67: {
502
+ 80: {
451
503
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
452
504
  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."
453
505
  },
454
- 82: {
506
+ 83: {
507
+ file: "@apollo/client/react/parser/index.js",
508
+ message: "[parser]: `parser` is deprecated and will be removed in Apollo Client 4.0. Please remove all usages of `parser`."
509
+ },
510
+ 91: {
511
+ file: "@apollo/client/utilities/deprecation/index.js",
512
+ message: "[%s]: `%s` is deprecated and will be removed in Apollo Client 4.0. %s"
513
+ },
514
+ 97: {
455
515
  file: "@apollo/client/utilities/graphql/directives.js",
456
516
  message: "@unmask 'mode' argument does not support variables."
457
517
  },
458
- 83: {
518
+ 98: {
459
519
  file: "@apollo/client/utilities/graphql/directives.js",
460
520
  message: "@unmask 'mode' argument must be of type string."
461
521
  },
462
- 84: {
522
+ 99: {
463
523
  file: "@apollo/client/utilities/graphql/directives.js",
464
524
  message: "@unmask 'mode' argument does not recognize value '%s'."
465
525
  },
466
- 98: {
526
+ 113: {
467
527
  file: "@apollo/client/utilities/graphql/transform.js",
468
528
  message: "Removing an @connection directive even though it does not have a key. " +
469
529
  "You may want to use the key parameter to specify a store key."
@@ -474,25 +534,25 @@ const devError = {
474
534
  file: "@apollo/client/cache/inmemory/writeToStore.js",
475
535
  message: "Missing field '%s' while writing result %o"
476
536
  },
477
- 23: {
537
+ 24: {
478
538
  file: "@apollo/client/core/ObservableQuery.js",
479
539
  message: "Unhandled GraphQL subscription error"
480
540
  },
481
- 25: {
541
+ 26: {
482
542
  file: "@apollo/client/core/ObservableQuery.js",
483
543
  message: "Unhandled error"
484
544
  },
485
- 68: {
545
+ 81: {
486
546
  file: "@apollo/client/react/hooks/useSyncExternalStore.js",
487
547
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
488
548
  },
489
- 97: {
549
+ 112: {
490
550
  file: "@apollo/client/utilities/graphql/transform.js",
491
551
  message: "Could not find operation or fragment"
492
552
  }
493
553
  };
494
554
 
495
- var version = "3.13.8";
555
+ var version = "3.14.0-alpha.0";
496
556
 
497
557
  function maybe(thunk) {
498
558
  try {