@apollo/client 3.8.0-beta.4 → 3.8.0-beta.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.
- package/apollo-client.cjs +225 -175
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.js +4 -3
- package/core/LocalState.js +2 -2
- package/core/ObservableQuery.d.ts +2 -0
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +26 -9
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.d.ts +2 -2
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +9 -9
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +42 -24
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +42 -24
- package/dev/dev.cjs +73 -80
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +73 -80
- package/invariantErrorCodes.js +72 -79
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/http.cjs +3 -3
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +3 -3
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +1 -1
- package/package.json +16 -16
- package/react/cache/QueryReference.d.ts +9 -3
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +50 -20
- package/react/cache/QueryReference.js.map +1 -1
- package/react/cache/SuspenseCache.d.ts +2 -2
- package/react/cache/SuspenseCache.d.ts.map +1 -1
- package/react/cache/SuspenseCache.js +2 -2
- package/react/cache/SuspenseCache.js.map +1 -1
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/context.cjs +3 -3
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +3 -3
- package/react/hoc/hoc-utils.js +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/withApollo.js +1 -1
- package/react/hooks/hooks.cjs +174 -27
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +174 -27
- package/react/hooks/index.d.ts +2 -1
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js +2 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +16 -13
- package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
- package/react/hooks/useBackgroundQuery.js +8 -44
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useQuery.js +1 -1
- package/react/hooks/useReadQuery.d.ts +8 -0
- package/react/hooks/useReadQuery.d.ts.map +1 -0
- package/react/hooks/useReadQuery.js +42 -0
- package/react/hooks/useReadQuery.js.map +1 -0
- package/react/hooks/useSubscription.js +2 -2
- package/react/hooks/useSuspenseCache.js +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +2 -2
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +5 -6
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/parser/index.js +5 -5
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/react.cjs +49 -20
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +49 -20
- package/react/types/types.d.ts +6 -0
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +1 -1
- package/testing/core/mocking/mockLink.js +1 -1
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +4 -4
- package/utilities/graphql/fragments.js +3 -3
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.js.map +1 -1
- package/utilities/promises/decoration.d.ts.map +1 -1
- package/utilities/promises/decoration.js +1 -0
- package/utilities/promises/decoration.js.map +1 -1
- package/utilities/utilities.cjs +20 -19
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +20 -19
- package/version.js +1 -1
package/dev/dev.cjs.native.js
CHANGED
|
@@ -62,7 +62,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
62
62
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
63
63
|
},
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
14: {
|
|
66
66
|
file: "@apollo/client/core/ApolloClient.js",
|
|
67
67
|
condition: "options.fetchPolicy !== 'cache-and-network'",
|
|
68
68
|
|
|
@@ -72,42 +72,42 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
72
72
|
'using a different fetchPolicy, such as cache-first or network-only.'
|
|
73
73
|
},
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
16: {
|
|
76
76
|
file: "@apollo/client/core/LocalState.js",
|
|
77
77
|
condition: "fragment",
|
|
78
78
|
message: "No fragment named %s"
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
17: {
|
|
82
82
|
file: "@apollo/client/core/LocalState.js",
|
|
83
83
|
condition: "fragment",
|
|
84
84
|
message: "No fragment named %s"
|
|
85
85
|
},
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
20: {
|
|
88
88
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
89
89
|
condition: "pollInterval",
|
|
90
90
|
message: 'Attempted to start a polling query without a polling interval.'
|
|
91
91
|
},
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
23: {
|
|
94
94
|
file: "@apollo/client/core/QueryManager.js",
|
|
95
95
|
message: 'QueryManager stopped while query was in flight'
|
|
96
96
|
},
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
24: {
|
|
99
99
|
file: "@apollo/client/core/QueryManager.js",
|
|
100
100
|
condition: "mutation",
|
|
101
101
|
message: 'mutation option is required. You must specify your GraphQL document in the mutation option.'
|
|
102
102
|
},
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
25: {
|
|
105
105
|
file: "@apollo/client/core/QueryManager.js",
|
|
106
106
|
condition: "fetchPolicy === 'network-only' ||\n fetchPolicy === 'no-cache'",
|
|
107
107
|
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."
|
|
108
108
|
},
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
26: {
|
|
111
111
|
file: "@apollo/client/core/QueryManager.js",
|
|
112
112
|
condition: "options.query",
|
|
113
113
|
|
|
@@ -115,45 +115,45 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
115
115
|
'in the query option.'
|
|
116
116
|
},
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
27: {
|
|
119
119
|
file: "@apollo/client/core/QueryManager.js",
|
|
120
120
|
condition: "options.query.kind === 'Document'",
|
|
121
121
|
message: 'You must wrap the query string in a "gql" tag.'
|
|
122
122
|
},
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
28: {
|
|
125
125
|
file: "@apollo/client/core/QueryManager.js",
|
|
126
126
|
condition: "!options.returnPartialData",
|
|
127
127
|
message: 'returnPartialData option only supported on watchQuery.'
|
|
128
128
|
},
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
29: {
|
|
131
131
|
file: "@apollo/client/core/QueryManager.js",
|
|
132
132
|
condition: "!options.pollInterval",
|
|
133
133
|
message: 'pollInterval option only supported on watchQuery.'
|
|
134
134
|
},
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
30: {
|
|
137
137
|
file: "@apollo/client/core/QueryManager.js",
|
|
138
138
|
message: 'Store reset while query was in flight (not completed in link chain)'
|
|
139
139
|
},
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
34: {
|
|
142
142
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
143
143
|
message: 'request is not implemented'
|
|
144
144
|
},
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
35: {
|
|
147
147
|
file: "@apollo/client/link/http/checkFetcher.js",
|
|
148
148
|
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 "
|
|
149
149
|
},
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
37: {
|
|
152
152
|
file: "@apollo/client/link/http/serializeFetchParameter.js",
|
|
153
153
|
message: "Network request failed. %s is not serializable: %s"
|
|
154
154
|
},
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
38: {
|
|
157
157
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
158
158
|
condition: "options && (typeof options.sha256 === 'function' ||\n typeof options.generateHash === 'function')",
|
|
159
159
|
|
|
@@ -162,18 +162,18 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
162
162
|
'parameter.'
|
|
163
163
|
},
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
39: {
|
|
166
166
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
167
167
|
condition: "forward",
|
|
168
168
|
message: 'PersistedQueryLink cannot be the last link in the chain.'
|
|
169
169
|
},
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
41: {
|
|
172
172
|
file: "@apollo/client/link/utils/validateOperation.js",
|
|
173
173
|
message: "illegal argument: %s"
|
|
174
174
|
},
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
42: {
|
|
177
177
|
file: "@apollo/client/react/context/ApolloConsumer.js",
|
|
178
178
|
condition: "context && context.client",
|
|
179
179
|
|
|
@@ -181,7 +181,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
181
181
|
'Wrap the root component in an <ApolloProvider>.'
|
|
182
182
|
},
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
43: {
|
|
185
185
|
file: "@apollo/client/react/context/ApolloContext.js",
|
|
186
186
|
condition: "'createContext' in React",
|
|
187
187
|
|
|
@@ -191,7 +191,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
191
191
|
'For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components'
|
|
192
192
|
},
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
44: {
|
|
195
195
|
file: "@apollo/client/react/context/ApolloProvider.js",
|
|
196
196
|
condition: "context.client",
|
|
197
197
|
|
|
@@ -199,7 +199,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
199
199
|
'sure you pass in your client via the "client" prop.'
|
|
200
200
|
},
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
45: {
|
|
203
203
|
file: "@apollo/client/react/hoc/hoc-utils.js",
|
|
204
204
|
condition: "this.withRef",
|
|
205
205
|
|
|
@@ -207,7 +207,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
207
207
|
"{ withRef: true } in the options"
|
|
208
208
|
},
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
46: {
|
|
211
211
|
file: "@apollo/client/react/hoc/withApollo.js",
|
|
212
212
|
condition: "operationOptions.withRef",
|
|
213
213
|
|
|
@@ -215,7 +215,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
215
215
|
"{ withRef: true } in the options"
|
|
216
216
|
},
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
47: {
|
|
219
219
|
file: "@apollo/client/react/hooks/useApolloClient.js",
|
|
220
220
|
condition: "!!client",
|
|
221
221
|
|
|
@@ -225,15 +225,15 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
225
225
|
},
|
|
226
226
|
|
|
227
227
|
49: {
|
|
228
|
-
file: "@apollo/client/react/hooks/
|
|
229
|
-
condition: "
|
|
228
|
+
file: "@apollo/client/react/hooks/useReadQuery.js",
|
|
229
|
+
condition: "internalQueryRef.promiseCache",
|
|
230
230
|
|
|
231
231
|
message: 'It appears that `useReadQuery` was used outside of `useBackgroundQuery`. ' +
|
|
232
232
|
'`useReadQuery` is only supported for use with `useBackgroundQuery`. ' +
|
|
233
233
|
'Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`.'
|
|
234
234
|
},
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
54: {
|
|
237
237
|
file: "@apollo/client/react/hooks/useSuspenseCache.js",
|
|
238
238
|
condition: "suspenseCache",
|
|
239
239
|
|
|
@@ -242,13 +242,13 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
242
242
|
'or pass a SuspenseCache instance in via options.'
|
|
243
243
|
},
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
55: {
|
|
246
246
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
247
247
|
condition: "supportedFetchPolicies.includes(fetchPolicy)",
|
|
248
248
|
message: "The fetch policy `%s` is not supported with suspense."
|
|
249
249
|
},
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
58: {
|
|
252
252
|
file: "@apollo/client/react/parser/index.js",
|
|
253
253
|
condition: "!!document && !!document.kind",
|
|
254
254
|
|
|
@@ -257,7 +257,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
257
257
|
"to convert your operation into a document"
|
|
258
258
|
},
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
59: {
|
|
261
261
|
file: "@apollo/client/react/parser/index.js",
|
|
262
262
|
condition: "!fragments.length ||\n (queries.length || mutations.length || subscriptions.length)",
|
|
263
263
|
|
|
@@ -265,7 +265,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
265
265
|
"You must include a query, subscription or mutation as well"
|
|
266
266
|
},
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
60: {
|
|
269
269
|
file: "@apollo/client/react/parser/index.js",
|
|
270
270
|
condition: "queries.length + mutations.length + subscriptions.length <= 1",
|
|
271
271
|
|
|
@@ -275,7 +275,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
275
275
|
"You can use 'compose' to join multiple operation types to a component"
|
|
276
276
|
},
|
|
277
277
|
|
|
278
|
-
|
|
278
|
+
61: {
|
|
279
279
|
file: "@apollo/client/react/parser/index.js",
|
|
280
280
|
condition: "definitions.length === 1",
|
|
281
281
|
|
|
@@ -284,7 +284,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
284
284
|
"You can use 'compose' to join multiple operation types to a component"
|
|
285
285
|
},
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
62: {
|
|
288
288
|
file: "@apollo/client/react/parser/index.js",
|
|
289
289
|
condition: "operation.type === type",
|
|
290
290
|
|
|
@@ -292,108 +292,108 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
292
292
|
"%s, but a %s was used instead."
|
|
293
293
|
},
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
63: {
|
|
296
296
|
file: "@apollo/client/testing/core/mocking/mockLink.js",
|
|
297
297
|
condition: "queryWithoutConnection",
|
|
298
298
|
message: "query is required"
|
|
299
299
|
},
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
64: {
|
|
302
302
|
file: "@apollo/client/utilities/graphql/DocumentTransform.js",
|
|
303
303
|
condition: "Array.isArray(cacheKeys)",
|
|
304
304
|
message: '`getCacheKey` must return an array or undefined'
|
|
305
305
|
},
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
65: {
|
|
308
308
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
309
309
|
condition: "evaledValue !== void 0",
|
|
310
310
|
message: "Invalid variable referenced in @%s directive."
|
|
311
311
|
},
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
66: {
|
|
314
314
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
315
315
|
condition: "directiveArguments && directiveArguments.length === 1",
|
|
316
316
|
message: "Incorrect number of arguments for the @%s directive."
|
|
317
317
|
},
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
67: {
|
|
320
320
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
321
321
|
condition: "ifArgument.name && ifArgument.name.value === 'if'",
|
|
322
322
|
message: "Invalid argument for the @%s directive."
|
|
323
323
|
},
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
68: {
|
|
326
326
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
327
327
|
condition: "ifValue &&\n (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue')",
|
|
328
328
|
message: "Argument for the @%s directive must be a variable or a boolean value."
|
|
329
329
|
},
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
69: {
|
|
332
332
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
333
333
|
|
|
334
334
|
message: "Found a %s operation%s. " +
|
|
335
335
|
'No operations are allowed when using a fragment as a query. Only fragments are allowed.'
|
|
336
336
|
},
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
70: {
|
|
339
339
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
340
340
|
condition: "fragments.length === 1",
|
|
341
341
|
message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
|
|
342
342
|
},
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
71: {
|
|
345
345
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
346
346
|
condition: "fragment",
|
|
347
347
|
message: "No fragment named %s"
|
|
348
348
|
},
|
|
349
349
|
|
|
350
|
-
|
|
350
|
+
72: {
|
|
351
351
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
352
352
|
condition: "doc && doc.kind === 'Document'",
|
|
353
353
|
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"
|
|
354
354
|
},
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
73: {
|
|
357
357
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
358
358
|
message: "Schema type definitions not allowed in queries. Found: \"%s\""
|
|
359
359
|
},
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
74: {
|
|
362
362
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
363
363
|
condition: "operations.length <= 1",
|
|
364
364
|
message: "Ambiguous GraphQL document: contains %s operations"
|
|
365
365
|
},
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
75: {
|
|
368
368
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
369
369
|
condition: "queryDef && queryDef.operation === 'query'",
|
|
370
370
|
message: 'Must contain a query definition.'
|
|
371
371
|
},
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
76: {
|
|
374
374
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
375
375
|
condition: "doc.kind === 'Document'",
|
|
376
376
|
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"
|
|
377
377
|
},
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
77: {
|
|
380
380
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
381
381
|
condition: "doc.definitions.length <= 1",
|
|
382
382
|
message: 'Fragment must have exactly one definition.'
|
|
383
383
|
},
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
78: {
|
|
386
386
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
387
387
|
condition: "fragmentDef.kind === 'FragmentDefinition'",
|
|
388
388
|
message: 'Must be a fragment definition.'
|
|
389
389
|
},
|
|
390
390
|
|
|
391
|
-
|
|
391
|
+
79: {
|
|
392
392
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
393
393
|
message: 'Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.'
|
|
394
394
|
},
|
|
395
395
|
|
|
396
|
-
|
|
396
|
+
80: {
|
|
397
397
|
file: "@apollo/client/utilities/graphql/storeUtils.js",
|
|
398
398
|
|
|
399
399
|
message: "The inline argument \"%s\" of kind \"%s\"" +
|
|
@@ -403,25 +403,18 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
403
403
|
};
|
|
404
404
|
|
|
405
405
|
const devDebug = {
|
|
406
|
-
|
|
406
|
+
15: {
|
|
407
407
|
file: "@apollo/client/core/ApolloClient.js",
|
|
408
408
|
message: "In client.refetchQueries, Promise.all promise rejected with error %o"
|
|
409
409
|
},
|
|
410
410
|
|
|
411
|
-
|
|
411
|
+
22: {
|
|
412
412
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
413
413
|
message: "Missing cache result fields: %o"
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
-
const devLog = {
|
|
418
|
-
14: {
|
|
419
|
-
file: "@apollo/client/core/ApolloClient.js",
|
|
420
|
-
|
|
421
|
-
message: "Download the Apollo DevTools for a better development " +
|
|
422
|
-
"experience: %s"
|
|
423
|
-
}
|
|
424
|
-
};
|
|
417
|
+
const devLog = {};
|
|
425
418
|
|
|
426
419
|
const devWarn = {
|
|
427
420
|
4: {
|
|
@@ -436,70 +429,70 @@ const devWarn = {
|
|
|
436
429
|
|
|
437
430
|
12: {
|
|
438
431
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
439
|
-
message: "Cache data may be lost when replacing the %s field of a %s object.\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: %s\n incoming: %s\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"
|
|
432
|
+
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: %s\n incoming: %s\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"
|
|
440
433
|
},
|
|
441
434
|
|
|
442
|
-
|
|
435
|
+
18: {
|
|
443
436
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
444
437
|
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 })?"
|
|
445
438
|
},
|
|
446
439
|
|
|
447
|
-
|
|
440
|
+
31: {
|
|
448
441
|
file: "@apollo/client/core/QueryManager.js",
|
|
449
442
|
message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
|
|
450
443
|
},
|
|
451
444
|
|
|
452
|
-
|
|
445
|
+
32: {
|
|
453
446
|
file: "@apollo/client/core/QueryManager.js",
|
|
454
447
|
message: "Unknown query %s requested in refetchQueries options.include array"
|
|
455
448
|
},
|
|
456
449
|
|
|
457
|
-
|
|
450
|
+
33: {
|
|
458
451
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
459
452
|
message: "You are calling concat on a terminating link, which will have no effect %o"
|
|
460
453
|
},
|
|
461
454
|
|
|
462
|
-
|
|
455
|
+
36: {
|
|
463
456
|
file: "@apollo/client/link/http/createHttpLink.js",
|
|
464
457
|
message: "Multipart-subscriptions do not support @defer"
|
|
465
458
|
},
|
|
466
459
|
|
|
467
|
-
|
|
460
|
+
40: {
|
|
468
461
|
file: "@apollo/client/link/utils/toPromise.js",
|
|
469
462
|
message: "Promise Wrapper does not support multiple results from Observable"
|
|
470
463
|
},
|
|
471
464
|
|
|
472
|
-
|
|
465
|
+
48: {
|
|
473
466
|
file: "@apollo/client/react/hooks/useQuery.js",
|
|
474
467
|
message: "Calling default no-op implementation of InternalState#forceUpdate"
|
|
475
468
|
},
|
|
476
469
|
|
|
477
|
-
|
|
470
|
+
50: {
|
|
478
471
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
479
472
|
message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
|
|
480
473
|
},
|
|
481
474
|
|
|
482
|
-
|
|
475
|
+
51: {
|
|
483
476
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
484
477
|
message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
|
|
485
478
|
},
|
|
486
479
|
|
|
487
|
-
|
|
480
|
+
52: {
|
|
488
481
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
489
482
|
message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
|
|
490
483
|
},
|
|
491
484
|
|
|
492
|
-
|
|
485
|
+
53: {
|
|
493
486
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
494
487
|
message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
|
|
495
488
|
},
|
|
496
489
|
|
|
497
|
-
|
|
490
|
+
56: {
|
|
498
491
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
499
492
|
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.'
|
|
500
493
|
},
|
|
501
494
|
|
|
502
|
-
|
|
495
|
+
82: {
|
|
503
496
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
504
497
|
|
|
505
498
|
message: 'Removing an @connection directive even though it does not have a key. ' +
|
|
@@ -513,28 +506,28 @@ const devError = {
|
|
|
513
506
|
message: "Missing field '%s' while writing result %o"
|
|
514
507
|
},
|
|
515
508
|
|
|
516
|
-
|
|
509
|
+
19: {
|
|
517
510
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
518
511
|
message: 'Unhandled GraphQL subscription error'
|
|
519
512
|
},
|
|
520
513
|
|
|
521
|
-
|
|
514
|
+
21: {
|
|
522
515
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
523
516
|
message: 'Unhandled error'
|
|
524
517
|
},
|
|
525
518
|
|
|
526
|
-
|
|
519
|
+
57: {
|
|
527
520
|
file: "@apollo/client/react/hooks/useSyncExternalStore.js",
|
|
528
521
|
message: 'The result of getSnapshot should be cached to avoid an infinite loop'
|
|
529
522
|
},
|
|
530
523
|
|
|
531
|
-
|
|
524
|
+
81: {
|
|
532
525
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
533
526
|
message: "Could not find operation or fragment"
|
|
534
527
|
}
|
|
535
528
|
};
|
|
536
529
|
|
|
537
|
-
var version = '3.8.0-beta.
|
|
530
|
+
var version = '3.8.0-beta.6';
|
|
538
531
|
|
|
539
532
|
function maybe(thunk) {
|
|
540
533
|
try {
|