@apollo/client 3.11.7 → 3.12.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 (187) hide show
  1. package/.changeset/nasty-camels-pay.md +36 -0
  2. package/.changeset/pre.json +10 -0
  3. package/CHANGELOG.md +43 -0
  4. package/apollo-client.cjs +438 -111
  5. package/apollo-client.cjs.map +1 -1
  6. package/apollo-client.min.cjs +1 -1
  7. package/cache/cache.cjs +218 -22
  8. package/cache/cache.cjs.map +1 -1
  9. package/cache/cache.cjs.native.js +218 -22
  10. package/cache/core/cache.d.ts +13 -10
  11. package/cache/core/cache.js +32 -14
  12. package/cache/core/cache.js.map +1 -1
  13. package/cache/core/types/Cache.d.ts +2 -1
  14. package/cache/core/types/Cache.js.map +1 -1
  15. package/cache/core/types/DataProxy.d.ts +4 -3
  16. package/cache/core/types/DataProxy.js.map +1 -1
  17. package/cache/inmemory/entityStore.js +3 -3
  18. package/cache/inmemory/inMemoryCache.d.ts +3 -1
  19. package/cache/inmemory/inMemoryCache.js +7 -0
  20. package/cache/inmemory/inMemoryCache.js.map +1 -1
  21. package/cache/inmemory/key-extractor.js +1 -1
  22. package/cache/inmemory/policies.js +4 -4
  23. package/cache/inmemory/readFromStore.js +2 -2
  24. package/cache/inmemory/writeToStore.js +4 -4
  25. package/core/ApolloClient.d.ts +14 -6
  26. package/core/ApolloClient.js +14 -6
  27. package/core/ApolloClient.js.map +1 -1
  28. package/core/LocalState.js +2 -2
  29. package/core/ObservableQuery.d.ts +17 -14
  30. package/core/ObservableQuery.js +29 -16
  31. package/core/ObservableQuery.js.map +1 -1
  32. package/core/QueryInfo.js.map +1 -1
  33. package/core/QueryManager.d.ts +18 -3
  34. package/core/QueryManager.js +39 -14
  35. package/core/QueryManager.js.map +1 -1
  36. package/core/core.cjs +285 -37
  37. package/core/core.cjs.map +1 -1
  38. package/core/core.cjs.native.js +285 -37
  39. package/core/index.d.ts +1 -0
  40. package/core/index.js.map +1 -1
  41. package/core/masking.d.ts +4 -0
  42. package/core/masking.js +212 -0
  43. package/core/masking.js.map +1 -0
  44. package/core/types.d.ts +3 -2
  45. package/core/types.js.map +1 -1
  46. package/core/watchQueryOptions.d.ts +8 -6
  47. package/core/watchQueryOptions.js.map +1 -1
  48. package/dev/dev.cjs +131 -87
  49. package/dev/dev.cjs.map +1 -1
  50. package/dev/dev.cjs.native.js +131 -87
  51. package/invariantErrorCodes.js +140 -86
  52. package/link/core/ApolloLink.js +2 -2
  53. package/link/core/core.cjs +2 -2
  54. package/link/core/core.cjs.map +1 -1
  55. package/link/core/core.cjs.native.js +2 -2
  56. package/link/http/checkFetcher.js +1 -1
  57. package/link/http/createHttpLink.js +1 -1
  58. package/link/http/http.cjs +6 -6
  59. package/link/http/http.cjs.map +1 -1
  60. package/link/http/http.cjs.native.js +6 -6
  61. package/link/http/selectHttpOptionsAndBody.js +3 -3
  62. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  63. package/link/http/serializeFetchParameter.js +1 -1
  64. package/link/persisted-queries/index.js +2 -2
  65. package/link/persisted-queries/persisted-queries.cjs +2 -2
  66. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  67. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  68. package/link/utils/toPromise.js +1 -1
  69. package/link/utils/utils.cjs +2 -2
  70. package/link/utils/utils.cjs.map +1 -1
  71. package/link/utils/utils.cjs.native.js +2 -2
  72. package/link/utils/validateOperation.js +1 -1
  73. package/masking/index.d.ts +2 -0
  74. package/masking/index.js +2 -0
  75. package/masking/index.js.map +1 -0
  76. package/masking/internal/types.d.ts +15 -0
  77. package/masking/internal/types.js +2 -0
  78. package/masking/internal/types.js.map +1 -0
  79. package/masking/masking.cjs +3 -0
  80. package/masking/masking.cjs.map +1 -0
  81. package/masking/masking.cjs.native.js +3 -0
  82. package/masking/masking.d.cts +1 -0
  83. package/masking/package.json +8 -0
  84. package/masking/types.d.ts +44 -0
  85. package/masking/types.js +2 -0
  86. package/masking/types.js.map +1 -0
  87. package/package.json +2 -1
  88. package/react/context/ApolloConsumer.js +1 -1
  89. package/react/context/ApolloContext.js +1 -1
  90. package/react/context/ApolloProvider.js +1 -1
  91. package/react/context/context.cjs +3 -3
  92. package/react/context/context.cjs.map +1 -1
  93. package/react/context/context.cjs.native.js +3 -3
  94. package/react/hoc/hoc-utils.js +1 -1
  95. package/react/hoc/hoc.cjs +2 -2
  96. package/react/hoc/hoc.cjs.map +1 -1
  97. package/react/hoc/hoc.cjs.native.js +2 -2
  98. package/react/hoc/withApollo.js +1 -1
  99. package/react/hooks/hooks.cjs +24 -16
  100. package/react/hooks/hooks.cjs.map +1 -1
  101. package/react/hooks/hooks.cjs.native.js +24 -16
  102. package/react/hooks/useApolloClient.js +1 -1
  103. package/react/hooks/useFragment.d.ts +4 -3
  104. package/react/hooks/useFragment.js +12 -5
  105. package/react/hooks/useFragment.js.map +1 -1
  106. package/react/hooks/useLazyQuery.js +1 -1
  107. package/react/hooks/useLazyQuery.js.map +1 -1
  108. package/react/hooks/useLoadableQuery.js +2 -2
  109. package/react/hooks/useQuery.d.ts +4 -3
  110. package/react/hooks/useQuery.js +2 -1
  111. package/react/hooks/useQuery.js.map +1 -1
  112. package/react/hooks/useReadQuery.d.ts +2 -1
  113. package/react/hooks/useReadQuery.js.map +1 -1
  114. package/react/hooks/useSubscription.d.ts +2 -1
  115. package/react/hooks/useSubscription.js +3 -3
  116. package/react/hooks/useSubscription.js.map +1 -1
  117. package/react/hooks/useSuspenseQuery.d.ts +6 -5
  118. package/react/hooks/useSuspenseQuery.js +2 -2
  119. package/react/hooks/useSuspenseQuery.js.map +1 -1
  120. package/react/hooks/useSyncExternalStore.js +1 -1
  121. package/react/internal/cache/QueryReference.d.ts +5 -4
  122. package/react/internal/cache/QueryReference.js +1 -1
  123. package/react/internal/cache/QueryReference.js.map +1 -1
  124. package/react/internal/internal.cjs +2 -2
  125. package/react/internal/internal.cjs.map +1 -1
  126. package/react/internal/internal.cjs.native.js +2 -2
  127. package/react/parser/index.js +5 -5
  128. package/react/parser/parser.cjs +5 -5
  129. package/react/parser/parser.cjs.map +1 -1
  130. package/react/parser/parser.cjs.native.js +5 -5
  131. package/react/types/types.d.ts +18 -42
  132. package/react/types/types.js.map +1 -1
  133. package/testing/core/core.cjs +3 -3
  134. package/testing/core/core.cjs.map +1 -1
  135. package/testing/core/core.cjs.native.js +3 -3
  136. package/testing/core/mocking/mockLink.d.ts +3 -2
  137. package/testing/core/mocking/mockLink.js +3 -3
  138. package/testing/core/mocking/mockLink.js.map +1 -1
  139. package/testing/core/mocking/mockQueryManager.d.ts +1 -0
  140. package/testing/core/mocking/mockQueryManager.js +1 -1
  141. package/testing/core/mocking/mockQueryManager.js.map +1 -1
  142. package/testing/internal/disposables/index.d.ts +1 -0
  143. package/testing/internal/disposables/index.js +1 -0
  144. package/testing/internal/disposables/index.js.map +1 -1
  145. package/testing/internal/disposables/withProdMode.d.ts +4 -0
  146. package/testing/internal/disposables/withProdMode.js +10 -0
  147. package/testing/internal/disposables/withProdMode.js.map +1 -0
  148. package/testing/internal/scenarios/index.d.ts +28 -0
  149. package/testing/internal/scenarios/index.js +18 -2
  150. package/testing/internal/scenarios/index.js.map +1 -1
  151. package/utilities/common/maybeDeepFreeze.d.ts +1 -0
  152. package/utilities/common/maybeDeepFreeze.js +1 -1
  153. package/utilities/common/maybeDeepFreeze.js.map +1 -1
  154. package/utilities/globals/globals.cjs +1 -1
  155. package/utilities/globals/globals.cjs.map +1 -1
  156. package/utilities/globals/globals.cjs.native.js +1 -1
  157. package/utilities/graphql/DocumentTransform.js +1 -1
  158. package/utilities/graphql/directives.d.ts +3 -1
  159. package/utilities/graphql/directives.js +39 -5
  160. package/utilities/graphql/directives.js.map +1 -1
  161. package/utilities/graphql/fragments.js +3 -3
  162. package/utilities/graphql/getFromAST.js +8 -8
  163. package/utilities/graphql/storeUtils.js +1 -1
  164. package/utilities/graphql/transform.d.ts +1 -0
  165. package/utilities/graphql/transform.js +15 -2
  166. package/utilities/graphql/transform.js.map +1 -1
  167. package/utilities/index.d.ts +7 -3
  168. package/utilities/index.js +4 -3
  169. package/utilities/index.js.map +1 -1
  170. package/utilities/promises/preventUnhandledRejection.d.ts +2 -0
  171. package/utilities/promises/preventUnhandledRejection.js +5 -0
  172. package/utilities/promises/preventUnhandledRejection.js.map +1 -0
  173. package/utilities/subscriptions/relay/relay.cjs.map +1 -1
  174. package/utilities/subscriptions/urql/urql.cjs.map +1 -1
  175. package/utilities/types/NoInfer.d.ts +27 -0
  176. package/utilities/types/NoInfer.js +2 -0
  177. package/utilities/types/NoInfer.js.map +1 -0
  178. package/utilities/types/Prettify.d.ts +4 -0
  179. package/utilities/types/Prettify.js +2 -0
  180. package/utilities/types/Prettify.js.map +1 -0
  181. package/utilities/types/UnionToIntersection.d.ts +2 -0
  182. package/utilities/types/UnionToIntersection.js +2 -0
  183. package/utilities/types/UnionToIntersection.js.map +1 -0
  184. package/utilities/utilities.cjs +73 -19
  185. package/utilities/utilities.cjs.map +1 -1
  186. package/utilities/utilities.cjs.native.js +73 -19
  187. package/version.js +1 -1
@@ -2,51 +2,51 @@ export const errorCodes = // This file is used by the error message display webs
2
2
  // @apollo/client/includeErrors entry point.
3
3
  // This file is not meant to be imported manually.
4
4
  {
5
- 1: {
5
+ 2: {
6
6
  file: "@apollo/client/cache/inmemory/entityStore.js",
7
7
  condition: "typeof dataId === \"string\"",
8
8
  message: "store.merge expects a string ID"
9
9
  },
10
10
 
11
- 4: {
11
+ 5: {
12
12
  file: "@apollo/client/cache/inmemory/key-extractor.js",
13
13
  condition: "extracted !== void 0",
14
14
  message: "Missing field '%s' while extracting keyFields from %s"
15
15
  },
16
16
 
17
- 5: {
17
+ 6: {
18
18
  file: "@apollo/client/cache/inmemory/policies.js",
19
19
  condition: "!old || old === which",
20
20
  message: "Cannot change root %s __typename more than once"
21
21
  },
22
22
 
23
- 8: {
23
+ 9: {
24
24
  file: "@apollo/client/cache/inmemory/policies.js",
25
25
  message: "Cannot automatically merge arrays"
26
26
  },
27
27
 
28
- 9: {
28
+ 10: {
29
29
  file: "@apollo/client/cache/inmemory/readFromStore.js",
30
30
  message: "No fragment named %s"
31
31
  },
32
32
 
33
- 10: {
33
+ 11: {
34
34
  file: "@apollo/client/cache/inmemory/readFromStore.js",
35
35
  condition: "!isReference(value)",
36
36
  message: "Missing selection set for object of type %s returned for query field %s"
37
37
  },
38
38
 
39
- 11: {
39
+ 12: {
40
40
  file: "@apollo/client/cache/inmemory/writeToStore.js",
41
41
  message: "Could not identify object %s"
42
42
  },
43
43
 
44
- 13: {
44
+ 14: {
45
45
  file: "@apollo/client/cache/inmemory/writeToStore.js",
46
46
  message: "No fragment named %s"
47
47
  },
48
48
 
49
- 15: {
49
+ 16: {
50
50
  file: "@apollo/client/core/ApolloClient.js",
51
51
 
52
52
  message: "To initialize Apollo Client, you must specify a 'cache' property " +
@@ -54,7 +54,7 @@ export const errorCodes = // This file is used by the error message display webs
54
54
  "For more information, please visit: https://go.apollo.dev/c/docs"
55
55
  },
56
56
 
57
- 16: {
57
+ 17: {
58
58
  file: "@apollo/client/core/ApolloClient.js",
59
59
  condition: "options.fetchPolicy !== \"cache-and-network\"",
60
60
 
@@ -64,48 +64,48 @@ export const errorCodes = // This file is used by the error message display webs
64
64
  "using a different fetchPolicy, such as cache-first or network-only."
65
65
  },
66
66
 
67
- 18: {
67
+ 19: {
68
68
  file: "@apollo/client/core/LocalState.js",
69
69
  condition: "fragment",
70
70
  message: "No fragment named %s"
71
71
  },
72
72
 
73
- 19: {
73
+ 20: {
74
74
  file: "@apollo/client/core/LocalState.js",
75
75
  condition: "fragment",
76
76
  message: "No fragment named %s"
77
77
  },
78
78
 
79
- 21: {
79
+ 22: {
80
80
  file: "@apollo/client/core/ObservableQuery.js",
81
81
  condition: "updateQuery",
82
82
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
83
83
  },
84
84
 
85
- 23: {
85
+ 24: {
86
86
  file: "@apollo/client/core/ObservableQuery.js",
87
87
  condition: "pollInterval",
88
88
  message: "Attempted to start a polling query without a polling interval."
89
89
  },
90
90
 
91
- 26: {
91
+ 27: {
92
92
  file: "@apollo/client/core/QueryManager.js",
93
93
  message: "QueryManager stopped while query was in flight"
94
94
  },
95
95
 
96
- 27: {
96
+ 28: {
97
97
  file: "@apollo/client/core/QueryManager.js",
98
98
  condition: "mutation",
99
99
  message: "mutation option is required. You must specify your GraphQL document in the mutation option."
100
100
  },
101
101
 
102
- 28: {
102
+ 29: {
103
103
  file: "@apollo/client/core/QueryManager.js",
104
104
  condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
105
105
  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."
106
106
  },
107
107
 
108
- 29: {
108
+ 30: {
109
109
  file: "@apollo/client/core/QueryManager.js",
110
110
  condition: "options.query",
111
111
 
@@ -113,45 +113,69 @@ export const errorCodes = // This file is used by the error message display webs
113
113
  "in the query option."
114
114
  },
115
115
 
116
- 30: {
116
+ 31: {
117
117
  file: "@apollo/client/core/QueryManager.js",
118
118
  condition: "options.query.kind === \"Document\"",
119
119
  message: 'You must wrap the query string in a "gql" tag.'
120
120
  },
121
121
 
122
- 31: {
122
+ 32: {
123
123
  file: "@apollo/client/core/QueryManager.js",
124
124
  condition: "!options.returnPartialData",
125
125
  message: "returnPartialData option only supported on watchQuery."
126
126
  },
127
127
 
128
- 32: {
128
+ 33: {
129
129
  file: "@apollo/client/core/QueryManager.js",
130
130
  condition: "!options.pollInterval",
131
131
  message: "pollInterval option only supported on watchQuery."
132
132
  },
133
133
 
134
- 33: {
134
+ 34: {
135
135
  file: "@apollo/client/core/QueryManager.js",
136
136
  message: "Store reset while query was in flight (not completed in link chain)"
137
137
  },
138
138
 
139
139
  37: {
140
+ file: "@apollo/client/core/masking.js",
141
+ condition: "definition",
142
+ message: "Expected a parsed GraphQL document with a query, mutation, or subscription."
143
+ },
144
+
145
+ 38: {
146
+ file: "@apollo/client/core/masking.js",
147
+ condition: "fragments.length === 1",
148
+ message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
149
+ },
150
+
151
+ 39: {
152
+ file: "@apollo/client/core/masking.js",
153
+ condition: "!!fragment",
154
+ message: "Could not find fragment with name \"%s\"."
155
+ },
156
+
157
+ 40: {
158
+ file: "@apollo/client/core/masking.js",
159
+ condition: "fragment",
160
+ message: "Could not find fragment with name '%s'."
161
+ },
162
+
163
+ 44: {
140
164
  file: "@apollo/client/link/core/ApolloLink.js",
141
165
  message: "request is not implemented"
142
166
  },
143
167
 
144
- 38: {
168
+ 45: {
145
169
  file: "@apollo/client/link/http/checkFetcher.js",
146
170
  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 "
147
171
  },
148
172
 
149
- 40: {
173
+ 47: {
150
174
  file: "@apollo/client/link/http/serializeFetchParameter.js",
151
175
  message: "Network request failed. %s is not serializable: %s"
152
176
  },
153
177
 
154
- 41: {
178
+ 48: {
155
179
  file: "@apollo/client/link/persisted-queries/index.js",
156
180
  condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
157
181
 
@@ -160,18 +184,18 @@ export const errorCodes = // This file is used by the error message display webs
160
184
  "parameter."
161
185
  },
162
186
 
163
- 42: {
187
+ 49: {
164
188
  file: "@apollo/client/link/persisted-queries/index.js",
165
189
  condition: "forward",
166
190
  message: "PersistedQueryLink cannot be the last link in the chain."
167
191
  },
168
192
 
169
- 44: {
193
+ 51: {
170
194
  file: "@apollo/client/link/utils/validateOperation.js",
171
195
  message: "illegal argument: %s"
172
196
  },
173
197
 
174
- 45: {
198
+ 52: {
175
199
  file: "@apollo/client/react/context/ApolloConsumer.js",
176
200
  condition: "context && context.client",
177
201
 
@@ -179,7 +203,7 @@ export const errorCodes = // This file is used by the error message display webs
179
203
  "Wrap the root component in an <ApolloProvider>."
180
204
  },
181
205
 
182
- 46: {
206
+ 53: {
183
207
  file: "@apollo/client/react/context/ApolloContext.js",
184
208
  condition: "\"createContext\" in React",
185
209
 
@@ -190,7 +214,7 @@ export const errorCodes = // This file is used by the error message display webs
190
214
  "For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components"
191
215
  },
192
216
 
193
- 47: {
217
+ 54: {
194
218
  file: "@apollo/client/react/context/ApolloProvider.js",
195
219
  condition: "context.client",
196
220
 
@@ -198,7 +222,7 @@ export const errorCodes = // This file is used by the error message display webs
198
222
  'sure you pass in your client via the "client" prop.'
199
223
  },
200
224
 
201
- 48: {
225
+ 55: {
202
226
  file: "@apollo/client/react/hoc/hoc-utils.js",
203
227
  condition: "this.withRef",
204
228
 
@@ -206,7 +230,7 @@ export const errorCodes = // This file is used by the error message display webs
206
230
  "{ withRef: true } in the options"
207
231
  },
208
232
 
209
- 49: {
233
+ 56: {
210
234
  file: "@apollo/client/react/hoc/withApollo.js",
211
235
  condition: "operationOptions.withRef",
212
236
 
@@ -214,7 +238,7 @@ export const errorCodes = // This file is used by the error message display webs
214
238
  "{ withRef: true } in the options"
215
239
  },
216
240
 
217
- 50: {
241
+ 57: {
218
242
  file: "@apollo/client/react/hooks/useApolloClient.js",
219
243
  condition: "!!client",
220
244
 
@@ -223,37 +247,37 @@ export const errorCodes = // This file is used by the error message display webs
223
247
  "instance in via options."
224
248
  },
225
249
 
226
- 51: {
250
+ 58: {
227
251
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
228
252
  condition: "!calledDuringRender()",
229
253
  message: "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook."
230
254
  },
231
255
 
232
- 52: {
256
+ 59: {
233
257
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
234
258
  condition: "internalQueryRef",
235
259
  message: "The query has not been loaded. Please load the query."
236
260
  },
237
261
 
238
- 57: {
262
+ 64: {
239
263
  file: "@apollo/client/react/hooks/useSubscription.js",
240
264
  condition: "!optionsRef.current.skip",
241
265
  message: "A subscription that is skipped cannot be restarted."
242
266
  },
243
267
 
244
- 58: {
268
+ 65: {
245
269
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
246
270
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
247
271
  message: "The fetch policy `%s` is not supported with suspense."
248
272
  },
249
273
 
250
- 61: {
274
+ 68: {
251
275
  file: "@apollo/client/react/internal/cache/QueryReference.js",
252
276
  condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",
253
277
  message: "Expected a QueryRef object, but got something else instead."
254
278
  },
255
279
 
256
- 62: {
280
+ 69: {
257
281
  file: "@apollo/client/react/parser/index.js",
258
282
  condition: "!!document && !!document.kind",
259
283
 
@@ -262,7 +286,7 @@ export const errorCodes = // This file is used by the error message display webs
262
286
  "to convert your operation into a document"
263
287
  },
264
288
 
265
- 63: {
289
+ 70: {
266
290
  file: "@apollo/client/react/parser/index.js",
267
291
  condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
268
292
 
@@ -270,7 +294,7 @@ export const errorCodes = // This file is used by the error message display webs
270
294
  "You must include a query, subscription or mutation as well"
271
295
  },
272
296
 
273
- 64: {
297
+ 71: {
274
298
  file: "@apollo/client/react/parser/index.js",
275
299
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
276
300
 
@@ -280,7 +304,7 @@ export const errorCodes = // This file is used by the error message display webs
280
304
  "You can use 'compose' to join multiple operation types to a component"
281
305
  },
282
306
 
283
- 65: {
307
+ 72: {
284
308
  file: "@apollo/client/react/parser/index.js",
285
309
  condition: "definitions.length === 1",
286
310
 
@@ -289,120 +313,120 @@ export const errorCodes = // This file is used by the error message display webs
289
313
  "You can use 'compose' to join multiple operation types to a component"
290
314
  },
291
315
 
292
- 66: {
316
+ 73: {
293
317
  file: "@apollo/client/react/parser/index.js",
294
318
  condition: "operation.type === type",
295
319
  message: "Running a %s requires a graphql " + "%s, but a %s was used instead."
296
320
  },
297
321
 
298
- 67: {
322
+ 74: {
299
323
  file: "@apollo/client/testing/core/mocking/mockLink.js",
300
324
  condition: "queryWithoutClientOnlyDirectives",
301
325
  message: "query is required"
302
326
  },
303
327
 
304
- 68: {
328
+ 75: {
305
329
  file: "@apollo/client/testing/core/mocking/mockLink.js",
306
330
  condition: "mockedResponse.maxUsageCount > 0",
307
331
  message: "Mock response maxUsageCount must be greater than 0, %s given"
308
332
  },
309
333
 
310
- 69: {
334
+ 76: {
311
335
  file: "@apollo/client/utilities/graphql/DocumentTransform.js",
312
336
  condition: "Array.isArray(cacheKeys)",
313
337
  message: "`getCacheKey` must return an array or undefined"
314
338
  },
315
339
 
316
- 70: {
340
+ 77: {
317
341
  file: "@apollo/client/utilities/graphql/directives.js",
318
342
  condition: "evaledValue !== void 0",
319
343
  message: "Invalid variable referenced in @%s directive."
320
344
  },
321
345
 
322
- 71: {
346
+ 78: {
323
347
  file: "@apollo/client/utilities/graphql/directives.js",
324
348
  condition: "directiveArguments && directiveArguments.length === 1",
325
349
  message: "Incorrect number of arguments for the @%s directive."
326
350
  },
327
351
 
328
- 72: {
352
+ 79: {
329
353
  file: "@apollo/client/utilities/graphql/directives.js",
330
354
  condition: "ifArgument.name && ifArgument.name.value === \"if\"",
331
355
  message: "Invalid argument for the @%s directive."
332
356
  },
333
357
 
334
- 73: {
358
+ 80: {
335
359
  file: "@apollo/client/utilities/graphql/directives.js",
336
360
  condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",
337
361
  message: "Argument for the @%s directive must be a variable or a boolean value."
338
362
  },
339
363
 
340
- 74: {
364
+ 84: {
341
365
  file: "@apollo/client/utilities/graphql/fragments.js",
342
366
 
343
367
  message: "Found a %s operation%s. " +
344
368
  "No operations are allowed when using a fragment as a query. Only fragments are allowed."
345
369
  },
346
370
 
347
- 75: {
371
+ 85: {
348
372
  file: "@apollo/client/utilities/graphql/fragments.js",
349
373
  condition: "fragments.length === 1",
350
374
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
351
375
  },
352
376
 
353
- 76: {
377
+ 86: {
354
378
  file: "@apollo/client/utilities/graphql/fragments.js",
355
379
  condition: "fragment",
356
380
  message: "No fragment named %s"
357
381
  },
358
382
 
359
- 77: {
383
+ 87: {
360
384
  file: "@apollo/client/utilities/graphql/getFromAST.js",
361
385
  condition: "doc && doc.kind === \"Document\"",
362
386
  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"
363
387
  },
364
388
 
365
- 78: {
389
+ 88: {
366
390
  file: "@apollo/client/utilities/graphql/getFromAST.js",
367
391
  message: "Schema type definitions not allowed in queries. Found: \"%s\""
368
392
  },
369
393
 
370
- 79: {
394
+ 89: {
371
395
  file: "@apollo/client/utilities/graphql/getFromAST.js",
372
396
  condition: "operations.length <= 1",
373
397
  message: "Ambiguous GraphQL document: contains %s operations"
374
398
  },
375
399
 
376
- 80: {
400
+ 90: {
377
401
  file: "@apollo/client/utilities/graphql/getFromAST.js",
378
402
  condition: "queryDef && queryDef.operation === \"query\"",
379
403
  message: "Must contain a query definition."
380
404
  },
381
405
 
382
- 81: {
406
+ 91: {
383
407
  file: "@apollo/client/utilities/graphql/getFromAST.js",
384
408
  condition: "doc.kind === \"Document\"",
385
409
  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"
386
410
  },
387
411
 
388
- 82: {
412
+ 92: {
389
413
  file: "@apollo/client/utilities/graphql/getFromAST.js",
390
414
  condition: "doc.definitions.length <= 1",
391
415
  message: "Fragment must have exactly one definition."
392
416
  },
393
417
 
394
- 83: {
418
+ 93: {
395
419
  file: "@apollo/client/utilities/graphql/getFromAST.js",
396
420
  condition: "fragmentDef.kind === \"FragmentDefinition\"",
397
421
  message: "Must be a fragment definition."
398
422
  },
399
423
 
400
- 84: {
424
+ 94: {
401
425
  file: "@apollo/client/utilities/graphql/getFromAST.js",
402
426
  message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
403
427
  },
404
428
 
405
- 85: {
429
+ 95: {
406
430
  file: "@apollo/client/utilities/graphql/storeUtils.js",
407
431
 
408
432
  message: "The inline argument \"%s\" of kind \"%s\"" +
@@ -412,12 +436,12 @@ export const errorCodes = // This file is used by the error message display webs
412
436
  };
413
437
 
414
438
  export const devDebug = {
415
- 17: {
439
+ 18: {
416
440
  file: "@apollo/client/core/ApolloClient.js",
417
441
  message: "In client.refetchQueries, Promise.all promise rejected with error %o"
418
442
  },
419
443
 
420
- 25: {
444
+ 26: {
421
445
  file: "@apollo/client/core/ObservableQuery.js",
422
446
  message: "Missing cache result fields: %o"
423
447
  }
@@ -426,7 +450,12 @@ export const devDebug = {
426
450
  export const devLog = {};
427
451
 
428
452
  export const devWarn = {
429
- 2: {
453
+ 1: {
454
+ file: "@apollo/client/cache/core/cache.js",
455
+ 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."
456
+ },
457
+
458
+ 3: {
430
459
  file: "@apollo/client/cache/inmemory/entityStore.js",
431
460
 
432
461
  message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
@@ -434,84 +463,109 @@ export const devWarn = {
434
463
  "`toReference(object, true)`"
435
464
  },
436
465
 
437
- 3: {
466
+ 4: {
438
467
  file: "@apollo/client/cache/inmemory/entityStore.js",
439
468
 
440
469
  message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
441
470
  "Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
442
471
  },
443
472
 
444
- 6: {
473
+ 7: {
445
474
  file: "@apollo/client/cache/inmemory/policies.js",
446
475
  message: "Inferring subtype %s of supertype %s"
447
476
  },
448
477
 
449
- 7: {
478
+ 8: {
450
479
  file: "@apollo/client/cache/inmemory/policies.js",
451
480
  message: "Undefined 'from' passed to readField with arguments %s"
452
481
  },
453
482
 
454
- 14: {
483
+ 15: {
455
484
  file: "@apollo/client/cache/inmemory/writeToStore.js",
456
485
  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"
457
486
  },
458
487
 
459
- 20: {
488
+ 21: {
460
489
  file: "@apollo/client/core/ObservableQuery.js",
461
490
  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 })?"
462
491
  },
463
492
 
464
- 34: {
493
+ 35: {
465
494
  file: "@apollo/client/core/QueryManager.js",
466
495
  message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
467
496
  },
468
497
 
469
- 35: {
498
+ 36: {
470
499
  file: "@apollo/client/core/QueryManager.js",
471
500
  message: "Unknown query %o requested in refetchQueries options.include array"
472
501
  },
473
502
 
474
- 36: {
503
+ 41: {
504
+ file: "@apollo/client/core/masking.js",
505
+ 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."
506
+ },
507
+
508
+ 42: {
509
+ file: "@apollo/client/core/masking.js",
510
+ 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."
511
+ },
512
+
513
+ 43: {
475
514
  file: "@apollo/client/link/core/ApolloLink.js",
476
515
  message: "You are calling concat on a terminating link, which will have no effect %o"
477
516
  },
478
517
 
479
- 39: {
518
+ 46: {
480
519
  file: "@apollo/client/link/http/createHttpLink.js",
481
520
  message: "Multipart-subscriptions do not support @defer"
482
521
  },
483
522
 
484
- 43: {
523
+ 50: {
485
524
  file: "@apollo/client/link/utils/toPromise.js",
486
525
  message: "Promise Wrapper does not support multiple results from Observable"
487
526
  },
488
527
 
489
- 53: {
528
+ 60: {
490
529
  file: "@apollo/client/react/hooks/useSubscription.js",
491
530
  message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
492
531
  },
493
532
 
494
- 54: {
533
+ 61: {
495
534
  file: "@apollo/client/react/hooks/useSubscription.js",
496
535
  message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
497
536
  },
498
537
 
499
- 55: {
538
+ 62: {
500
539
  file: "@apollo/client/react/hooks/useSubscription.js",
501
540
  message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
502
541
  },
503
542
 
504
- 56: {
543
+ 63: {
505
544
  file: "@apollo/client/react/hooks/useSubscription.js",
506
545
  message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
507
546
  },
508
547
 
509
- 59: {
548
+ 66: {
510
549
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
511
550
  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."
512
551
  },
513
552
 
514
- 87: {
553
+ 81: {
554
+ file: "@apollo/client/utilities/graphql/directives.js",
555
+ message: "@unmask 'mode' argument does not support variables."
556
+ },
557
+
558
+ 82: {
559
+ file: "@apollo/client/utilities/graphql/directives.js",
560
+ message: "@unmask 'mode' argument must be of type string."
561
+ },
562
+
563
+ 83: {
564
+ file: "@apollo/client/utilities/graphql/directives.js",
565
+ message: "@unmask 'mode' argument does not recognize value '%s'."
566
+ },
567
+
568
+ 97: {
515
569
  file: "@apollo/client/utilities/graphql/transform.js",
516
570
 
517
571
  message: "Removing an @connection directive even though it does not have a key. " +
@@ -520,27 +574,27 @@ export const devWarn = {
520
574
  };
521
575
 
522
576
  export const devError = {
523
- 12: {
577
+ 13: {
524
578
  file: "@apollo/client/cache/inmemory/writeToStore.js",
525
579
  message: "Missing field '%s' while writing result %o"
526
580
  },
527
581
 
528
- 22: {
582
+ 23: {
529
583
  file: "@apollo/client/core/ObservableQuery.js",
530
584
  message: "Unhandled GraphQL subscription error"
531
585
  },
532
586
 
533
- 24: {
587
+ 25: {
534
588
  file: "@apollo/client/core/ObservableQuery.js",
535
589
  message: "Unhandled error"
536
590
  },
537
591
 
538
- 60: {
592
+ 67: {
539
593
  file: "@apollo/client/react/hooks/useSyncExternalStore.js",
540
594
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
541
595
  },
542
596
 
543
- 86: {
597
+ 96: {
544
598
  file: "@apollo/client/utilities/graphql/transform.js",
545
599
  message: "Could not find operation or fragment"
546
600
  }
@@ -49,7 +49,7 @@ var ApolloLink = /** @class */ (function () {
49
49
  ApolloLink.concat = function (first, second) {
50
50
  var firstLink = toLink(first);
51
51
  if (isTerminating(firstLink)) {
52
- globalThis.__DEV__ !== false && invariant.warn(36, firstLink);
52
+ globalThis.__DEV__ !== false && invariant.warn(43, firstLink);
53
53
  return firstLink;
54
54
  }
55
55
  var nextLink = toLink(second);
@@ -75,7 +75,7 @@ var ApolloLink = /** @class */ (function () {
75
75
  return ApolloLink.concat(this, next);
76
76
  };
77
77
  ApolloLink.prototype.request = function (operation, forward) {
78
- throw newInvariantError(37);
78
+ throw newInvariantError(44);
79
79
  };
80
80
  ApolloLink.prototype.onError = function (error, observer) {
81
81
  if (observer && observer.error) {