@apollo/client 4.1.0-alpha.0 → 4.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/__cjs/cache/core/cache.cjs +1 -1
  3. package/__cjs/cache/core/cache.cjs.map +1 -1
  4. package/__cjs/cache/core/cache.d.cts +19 -0
  5. package/__cjs/cache/inmemory/entityStore.cjs +3 -3
  6. package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
  7. package/__cjs/cache/inmemory/inMemoryCache.cjs +3 -0
  8. package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
  9. package/__cjs/cache/inmemory/inMemoryCache.d.cts +1 -0
  10. package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  11. package/__cjs/cache/inmemory/key-extractor.cjs.map +1 -1
  12. package/__cjs/cache/inmemory/policies.cjs +4 -4
  13. package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
  14. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  15. package/__cjs/core/ApolloClient.cjs +14 -13
  16. package/__cjs/core/ApolloClient.cjs.map +1 -1
  17. package/__cjs/core/ApolloClient.d.cts +12 -0
  18. package/__cjs/core/ObservableQuery.cjs +6 -6
  19. package/__cjs/core/QueryManager.cjs +19 -17
  20. package/__cjs/core/QueryManager.cjs.map +1 -1
  21. package/__cjs/incremental/handlers/graphql17Alpha9.cjs +1 -1
  22. package/__cjs/incremental/handlers/notImplemented.cjs +1 -1
  23. package/__cjs/incremental/handlers/notImplemented.cjs.map +1 -1
  24. package/__cjs/invariantErrorCodes.cjs +72 -62
  25. package/__cjs/link/core/ApolloLink.cjs +3 -3
  26. package/__cjs/link/http/checkFetcher.cjs +1 -1
  27. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  28. package/__cjs/link/persisted-queries/index.cjs +2 -2
  29. package/__cjs/link/ws/index.cjs +1 -1
  30. package/__cjs/local-state/LocalState.cjs +28 -14
  31. package/__cjs/local-state/LocalState.cjs.map +1 -1
  32. package/__cjs/local-state/LocalState.d.cts +3 -2
  33. package/__cjs/react/hooks/useMutation.cjs +7 -1
  34. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  35. package/__cjs/react/hooks/useMutation.d.cts +13 -1
  36. package/__cjs/version.cjs +1 -1
  37. package/cache/core/cache.d.ts +19 -0
  38. package/cache/core/cache.js +1 -1
  39. package/cache/core/cache.js.map +1 -1
  40. package/cache/inmemory/entityStore.js +3 -3
  41. package/cache/inmemory/entityStore.js.map +1 -1
  42. package/cache/inmemory/inMemoryCache.d.ts +1 -0
  43. package/cache/inmemory/inMemoryCache.js +3 -0
  44. package/cache/inmemory/inMemoryCache.js.map +1 -1
  45. package/cache/inmemory/key-extractor.js +1 -1
  46. package/cache/inmemory/key-extractor.js.map +1 -1
  47. package/cache/inmemory/policies.js +4 -4
  48. package/cache/inmemory/readFromStore.js +2 -2
  49. package/cache/inmemory/writeToStore.js +4 -4
  50. package/core/ApolloClient.d.ts +12 -0
  51. package/core/ApolloClient.js +14 -13
  52. package/core/ApolloClient.js.map +1 -1
  53. package/core/ObservableQuery.js +6 -6
  54. package/core/QueryManager.js +19 -17
  55. package/core/QueryManager.js.map +1 -1
  56. package/incremental/handlers/graphql17Alpha9.js +1 -1
  57. package/incremental/handlers/notImplemented.js +1 -1
  58. package/incremental/handlers/notImplemented.js.map +1 -1
  59. package/invariantErrorCodes.js +72 -62
  60. package/link/core/ApolloLink.js +3 -3
  61. package/link/http/checkFetcher.js +1 -1
  62. package/link/http/parseAndCheckHttpResponse.js +1 -1
  63. package/link/persisted-queries/index.js +2 -2
  64. package/link/ws/index.js +1 -1
  65. package/local-state/LocalState.d.ts +3 -2
  66. package/local-state/LocalState.js +28 -14
  67. package/local-state/LocalState.js.map +1 -1
  68. package/package.json +1 -1
  69. package/react/hooks/useMutation.d.ts +13 -1
  70. package/react/hooks/useMutation.js +7 -1
  71. package/react/hooks/useMutation.js.map +1 -1
  72. package/react/hooks-compiled/useMutation.d.ts +13 -1
  73. package/react/hooks-compiled/useMutation.js +5 -1
  74. package/react/hooks-compiled/useMutation.js.map +1 -1
  75. package/version.js +1 -1
@@ -36,7 +36,7 @@ class IncrementalRequest {
36
36
  if (hasIncrementalChunks(chunk)) {
37
37
  for (const incremental of chunk.incremental) {
38
38
  const pending = this.pending.find(({ id }) => incremental.id === id);
39
- (0, invariant_1.invariant)(pending, 64);
39
+ (0, invariant_1.invariant)(pending, 66);
40
40
  const path = pending.path.concat(incremental.subPath ?? []);
41
41
  let data;
42
42
  let arrayMerge = "truncate";
@@ -8,7 +8,7 @@ class NotImplementedHandler {
8
8
  return false;
9
9
  }
10
10
  prepareRequest(request) {
11
- (0, invariant_1.invariant)(!(0, internal_1.hasDirectives)(["defer"], request.query), 65);
11
+ (0, invariant_1.invariant)(!(0, internal_1.hasDirectives)(["defer", "stream"], request.query), 67);
12
12
  return request;
13
13
  }
14
14
  extractErrors() { }
@@ -1 +1 @@
1
- {"version":3,"file":"notImplemented.cjs","sources":["../../../../src/incremental/handlers/notImplemented.ts"],"sourcesContent":["import type { ApolloLink } from \"@apollo/client/link\";\nimport type { HKT } from \"@apollo/client/utilities\";\nimport { hasDirectives } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace NotImplementedHandler {\n interface NotImplementedResult extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: never;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: NotImplementedResult;\n }\n}\n\nexport class NotImplementedHandler implements Incremental.Handler<never> {\n isIncrementalResult(_: any): _ is never {\n return false;\n }\n prepareRequest(request: ApolloLink.Request) {\n invariant(\n !hasDirectives([\"defer\"], request.query),\n \"`@defer` is not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor.\"\n );\n\n return request;\n }\n extractErrors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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"notImplemented.cjs","sources":["../../../../src/incremental/handlers/notImplemented.ts"],"sourcesContent":["import type { ApolloLink } from \"@apollo/client/link\";\nimport type { HKT } from \"@apollo/client/utilities\";\nimport { hasDirectives } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nimport type { Incremental } from \"../types.js\";\n\nexport declare namespace NotImplementedHandler {\n interface NotImplementedResult extends HKT {\n arg1: unknown; // TData\n arg2: unknown; // TExtensions\n return: never;\n }\n export interface TypeOverrides {\n AdditionalApolloLinkResultTypes: NotImplementedResult;\n }\n}\n\nexport class NotImplementedHandler implements Incremental.Handler<never> {\n isIncrementalResult(_: any): _ is never {\n return false;\n }\n prepareRequest(request: ApolloLink.Request) {\n invariant(\n !hasDirectives([\"defer\", \"stream\"], request.query),\n \"`@defer` and `@stream` are not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor.\"\n );\n\n return request;\n }\n extractErrors() {}\n // This code path can never be reached, so we won't implement it.\n startRequest = undefined as any;\n}\n"],"names":[],"mappings":";;;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;"}
@@ -278,24 +278,24 @@ you have an infinite render loop in your application.`
278
278
  message: "No fragment named %s"
279
279
  },
280
280
 
281
- 53: {
281
+ 55: {
282
282
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
283
283
  message: "Could not resolve __typename on object %o returned from resolver '%s'. '__typename' needs to be returned to properly resolve child fields."
284
284
  },
285
285
 
286
- 54: {
286
+ 56: {
287
287
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
288
288
  condition: "fragment",
289
289
  message: `No fragment named %s`
290
290
  },
291
291
 
292
- 55: {
292
+ 57: {
293
293
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
294
294
  condition: "cache.fragmentMatches",
295
295
  message: "The configured cache does not support fragment matching which will lead to incorrect results when executing local resolvers. Please use a cache that implements `fragmetMatches`."
296
296
  },
297
297
 
298
- 57: {
298
+ 59: {
299
299
  file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
300
300
  condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
301
301
 
@@ -304,13 +304,13 @@ you have an infinite render loop in your application.`
304
304
  "parameter."
305
305
  },
306
306
 
307
- 58: {
307
+ 60: {
308
308
  file: "@apollo/client/__cjs/link/persisted-queries/index.cjs",
309
309
  condition: "forward",
310
310
  message: "PersistedQueryLink cannot be the last link in the chain."
311
311
  },
312
312
 
313
- 59: {
313
+ 61: {
314
314
  file: "@apollo/client/__cjs/link/http/checkFetcher.cjs",
315
315
  condition: "fetcher || typeof fetch !== \"undefined\"",
316
316
 
@@ -328,30 +328,30 @@ const client = new ApolloClient({
328
328
  `
329
329
  },
330
330
 
331
- 60: {
331
+ 62: {
332
332
  file: "@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs",
333
333
  condition: "response.body && typeof response.body.getReader === \"function\"",
334
334
  message: "Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`."
335
335
  },
336
336
 
337
- 63: {
337
+ 65: {
338
338
  file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
339
339
  message: "request is not implemented"
340
340
  },
341
341
 
342
- 64: {
342
+ 66: {
343
343
  file: "@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs",
344
344
  condition: "pending",
345
345
  message: "Could not find pending chunk for incremental value. Please file an issue for the Apollo Client team to investigate."
346
346
  },
347
347
 
348
- 65: {
348
+ 67: {
349
349
  file: "@apollo/client/__cjs/incremental/handlers/notImplemented.cjs",
350
- condition: "!(0, internal_1.hasDirectives)([\"defer\"], request.query)",
351
- message: "`@defer` is not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor."
350
+ condition: "!(0, internal_1.hasDirectives)([\"defer\", \"stream\"], request.query)",
351
+ message: "`@defer` and `@stream` are not supported without specifying an incremental handler. Please pass a handler as the `incrementalHandler` option to the `ApolloClient` constructor."
352
352
  },
353
353
 
354
- 66: {
354
+ 68: {
355
355
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
356
356
  condition: "options.cache",
357
357
 
@@ -360,7 +360,7 @@ const client = new ApolloClient({
360
360
  "For more information, please visit: https://go.apollo.dev/c/docs"
361
361
  },
362
362
 
363
- 67: {
363
+ 69: {
364
364
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
365
365
  condition: "options.link",
366
366
 
@@ -369,7 +369,7 @@ const client = new ApolloClient({
369
369
  "For more information, please visit: https://go.apollo.dev/c/docs"
370
370
  },
371
371
 
372
- 68: {
372
+ 70: {
373
373
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
374
374
  condition: "options.fetchPolicy !== \"cache-and-network\"",
375
375
 
@@ -379,7 +379,7 @@ const client = new ApolloClient({
379
379
  "using a different fetchPolicy, such as cache-first or network-only."
380
380
  },
381
381
 
382
- 69: {
382
+ 71: {
383
383
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
384
384
  condition: "options.fetchPolicy !== \"standby\"",
385
385
 
@@ -388,7 +388,7 @@ const client = new ApolloClient({
388
388
  "as cache-first or network-only."
389
389
  },
390
390
 
391
- 70: {
391
+ 72: {
392
392
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
393
393
  condition: "options.query",
394
394
 
@@ -396,158 +396,158 @@ const client = new ApolloClient({
396
396
  "in the query option."
397
397
  },
398
398
 
399
- 71: {
399
+ 73: {
400
400
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
401
401
  condition: "options.query.kind === \"Document\"",
402
402
  message: 'You must wrap the query string in a "gql" tag.'
403
403
  },
404
404
 
405
- 72: {
405
+ 74: {
406
406
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
407
407
  condition: "!options.returnPartialData",
408
408
  message: "returnPartialData option only supported on watchQuery."
409
409
  },
410
410
 
411
- 73: {
411
+ 75: {
412
412
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
413
413
  condition: "!options.pollInterval",
414
414
  message: "pollInterval option only supported on watchQuery."
415
415
  },
416
416
 
417
- 74: {
417
+ 76: {
418
418
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
419
419
  condition: "!options.notifyOnNetworkStatusChange",
420
420
  message: "notifyOnNetworkStatusChange option only supported on watchQuery."
421
421
  },
422
422
 
423
- 75: {
423
+ 77: {
424
424
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
425
425
  condition: "optionsWithDefaults.mutation",
426
426
  message: "The `mutation` option is required. Please provide a GraphQL document in the `mutation` option."
427
427
  },
428
428
 
429
- 76: {
429
+ 78: {
430
430
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
431
431
  condition: "optionsWithDefaults.fetchPolicy === \"network-only\" ||\n optionsWithDefaults.fetchPolicy === \"no-cache\"",
432
432
  message: "Mutations only support 'network-only' or 'no-cache' fetch policies. The default 'network-only' behavior automatically writes mutation results to the cache. Passing 'no-cache' skips the cache write."
433
433
  },
434
434
 
435
- 79: {
435
+ 81: {
436
436
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
437
437
  condition: "this.options.fetchPolicy !== \"cache-only\"",
438
438
  message: "Cannot execute `fetchMore` for 'cache-only' query '%s'. Please use a different fetch policy."
439
439
  },
440
440
 
441
- 80: {
441
+ 82: {
442
442
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
443
443
  condition: "updateQuery",
444
444
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
445
445
  },
446
446
 
447
- 84: {
447
+ 86: {
448
448
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
449
449
  message: "QueryManager stopped while query was in flight"
450
450
  },
451
451
 
452
- 85: {
452
+ 87: {
453
453
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
454
454
  condition: "this.localState",
455
455
  message: "Mutation '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
456
456
  },
457
457
 
458
- 86: {
458
+ 88: {
459
459
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
460
460
  message: "Store reset while query was in flight (not completed in link chain)"
461
461
  },
462
462
 
463
- 89: {
463
+ 91: {
464
464
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
465
465
  condition: "!this.getDocumentInfo(query).hasClientExports || this.localState",
466
466
  message: "Subscription '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
467
467
  },
468
468
 
469
- 90: {
469
+ 92: {
470
470
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
471
471
  condition: "this.localState",
472
472
  message: "%s '%s' contains `@client` fields but local state has not been configured."
473
473
  },
474
474
 
475
- 91: {
475
+ 93: {
476
476
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
477
477
  condition: "!hasIncrementalDirective",
478
478
  message: "%s '%s' contains `@client` and `@defer` directives. These cannot be used together."
479
479
  },
480
480
 
481
- 92: {
481
+ 94: {
482
482
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
483
483
  condition: "this.localState",
484
484
  message: "Query '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
485
485
  },
486
486
 
487
- 94: {
487
+ 96: {
488
488
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
489
489
  condition: "this.localState",
490
490
  message: "Query '%s' contains `@client` fields but local state has not been configured."
491
491
  },
492
492
 
493
- 95: {
493
+ 97: {
494
494
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
495
495
  condition: "didEmitValue",
496
496
  message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
497
497
  },
498
498
 
499
- 96: {
499
+ 98: {
500
500
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
501
501
  condition: "typeof dataId === \"string\"",
502
502
  message: "store.merge expects a string ID"
503
503
  },
504
504
 
505
- 99: {
505
+ 101: {
506
506
  file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
507
507
  condition: "extracted !== void 0",
508
508
  message: `Missing field '%s' while extracting keyFields from %s`
509
509
  },
510
510
 
511
- 100: {
511
+ 102: {
512
512
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
513
513
  condition: "!old || old === which",
514
514
  message: `Cannot change root %s __typename more than once`
515
515
  },
516
516
 
517
- 103: {
517
+ 105: {
518
518
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
519
519
  message: "Cannot automatically merge arrays"
520
520
  },
521
521
 
522
- 104: {
522
+ 106: {
523
523
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
524
524
  message: `No fragment named %s`
525
525
  },
526
526
 
527
- 105: {
527
+ 107: {
528
528
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
529
529
  condition: "!(0, utilities_1.isReference)(value)",
530
530
  message: `Missing selection set for object of type %s returned for query field %s`
531
531
  },
532
532
 
533
- 106: {
533
+ 108: {
534
534
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
535
535
  message: `Could not identify object %s`
536
536
  },
537
537
 
538
- 108: {
538
+ 110: {
539
539
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
540
540
  message: `No fragment named %s`
541
541
  }
542
542
  };
543
543
 
544
544
  exports.devDebug = {
545
- 77: {
545
+ 79: {
546
546
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
547
547
  message: `In client.refetchQueries, Promise.all promise rejected with error %o`
548
548
  },
549
549
 
550
- 83: {
550
+ 85: {
551
551
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
552
552
  message: `Missing cache result fields: %o`
553
553
  }
@@ -583,30 +583,40 @@ exports.devWarn = {
583
583
 
584
584
  50: {
585
585
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
586
- message: "The '%s' resolver returned `undefined` instead of a value. This is likely a bug in the resolver. If you didn't mean to return a value, return `null` instead."
586
+ message: "The '%s' field resolves the value from the cache, for example from a 'read' function, but a 'no-cache' fetch policy was used. The field value has been set to `null`. Either define a local resolver or use a fetch policy that uses the cache to ensure the field is resolved correctly."
587
587
  },
588
588
 
589
589
  51: {
590
590
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
591
- message: "The '%s' field had no cached value and only forced resolvers were run. The value was set to `null`."
591
+ message: "Could not find a resolver for the '%s' field nor does the cache resolve the field. The field value has been set to `null`. Either define a resolver for the field or ensure the cache can resolve the value, for example, by adding a 'read' function to a field policy in 'InMemoryCache'."
592
592
  },
593
593
 
594
594
  52: {
595
+ file: "@apollo/client/__cjs/local-state/LocalState.cjs",
596
+ message: "The '%s' resolver returned `undefined` instead of a value. This is likely a bug in the resolver. If you didn't mean to return a value, return `null` instead."
597
+ },
598
+
599
+ 53: {
600
+ file: "@apollo/client/__cjs/local-state/LocalState.cjs",
601
+ message: "The '%s' field had no cached value and only forced resolvers were run. The value was set to `null`."
602
+ },
603
+
604
+ 54: {
595
605
  file: "@apollo/client/__cjs/local-state/LocalState.cjs",
596
606
  message: "The '%s' field on object %o returned `undefined` instead of a value. The parent resolver did not include the property in the returned value and there was no resolver defined for the field."
597
607
  },
598
608
 
599
- 56: {
609
+ 58: {
600
610
  file: "@apollo/client/__cjs/link/ws/index.cjs",
601
611
  message: "`WebSocketLink` uses the deprecated and unmaintained `subscriptions-transport-ws` library. This link is no longer maintained and will be removed in a future major version of Apollo Client. We recommend switching to `GraphQLWsLink` which uses the `graphql-ws` library to send GraphQL operations through WebSocket connections (https://the-guild.dev/graphql/ws)."
602
612
  },
603
613
 
604
- 61: {
614
+ 63: {
605
615
  file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
606
616
  message: "[ApolloLink.split]: The test function returned a non-boolean value which could result in subtle bugs (e.g. such as using an `async` function which always returns a truthy value). Got `%o`."
607
617
  },
608
618
 
609
- 62: {
619
+ 64: {
610
620
  file: "@apollo/client/__cjs/link/core/ApolloLink.cjs",
611
621
 
612
622
  message: "The terminating link provided to `ApolloLink.execute` called `forward` instead of handling the request. " +
@@ -615,34 +625,34 @@ exports.devWarn = {
615
625
  "If you are using a split link, ensure each branch contains a terminating link that handles the request."
616
626
  },
617
627
 
618
- 78: {
628
+ 80: {
619
629
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
620
630
 
621
631
  message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
622
632
  Did you mean to call refetch(variables) instead of refetch({ variables })?`
623
633
  },
624
634
 
625
- 82: {
635
+ 84: {
626
636
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
627
637
  message: "Cannot poll on 'cache-only' query '%s' and as such, polling is disabled. Please use a different fetch policy."
628
638
  },
629
639
 
630
- 87: {
640
+ 89: {
631
641
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
632
642
  message: `Unknown query named "%s" requested in refetchQueries options.include array`
633
643
  },
634
644
 
635
- 88: {
645
+ 90: {
636
646
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
637
647
  message: `Unknown anonymous query requested in refetchQueries options.include array`
638
648
  },
639
649
 
640
- 93: {
650
+ 95: {
641
651
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
642
652
  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.'
643
653
  },
644
654
 
645
- 97: {
655
+ 99: {
646
656
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
647
657
 
648
658
  message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
@@ -650,24 +660,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
650
660
  "`toReference(object, true)`"
651
661
  },
652
662
 
653
- 98: {
663
+ 100: {
654
664
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
655
665
 
656
666
  message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
657
667
  "Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
658
668
  },
659
669
 
660
- 101: {
670
+ 103: {
661
671
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
662
672
  message: `Inferring subtype %s of supertype %s`
663
673
  },
664
674
 
665
- 102: {
675
+ 104: {
666
676
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
667
677
  message: `Undefined 'from' passed to readField with arguments %s`
668
678
  },
669
679
 
670
- 109: {
680
+ 111: {
671
681
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
672
682
 
673
683
  message: `Cache data may be lost when replacing the %s field of a %s object.
@@ -686,7 +696,7 @@ For more information about these options, please refer to the documentation:
686
696
  `
687
697
  },
688
698
 
689
- 110: {
699
+ 112: {
690
700
  file: "@apollo/client/__cjs/cache/core/cache.cjs",
691
701
  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."
692
702
  }
@@ -703,12 +713,12 @@ exports.devError = {
703
713
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
704
714
  },
705
715
 
706
- 81: {
716
+ 83: {
707
717
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
708
718
  message: "Unhandled GraphQL subscription error"
709
719
  },
710
720
 
711
- 107: {
721
+ 109: {
712
722
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
713
723
  message: `Missing field '%s' while writing result %o`
714
724
  }
@@ -107,7 +107,7 @@ class ApolloLink {
107
107
  const result = test(operation);
108
108
  if (environment_1.__DEV__) {
109
109
  if (typeof result !== "boolean") {
110
- __DEV__ && invariant_1.invariant.warn(61, result);
110
+ __DEV__ && invariant_1.invariant.warn(63, result);
111
111
  }
112
112
  }
113
113
  return result ?
@@ -149,7 +149,7 @@ class ApolloLink {
149
149
  static execute(link, request, context) {
150
150
  return link.request((0, utils_1.createOperation)(request, context), () => {
151
151
  if (environment_1.__DEV__) {
152
- __DEV__ && invariant_1.invariant.warn(62);
152
+ __DEV__ && invariant_1.invariant.warn(64);
153
153
  }
154
154
  return rxjs_1.EMPTY;
155
155
  });
@@ -253,7 +253,7 @@ class ApolloLink {
253
253
  * > request instead.
254
254
  */
255
255
  request(operation, forward) {
256
- throw (0, invariant_1.newInvariantError)(63);
256
+ throw (0, invariant_1.newInvariantError)(65);
257
257
  }
258
258
  /**
259
259
  * @internal
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkFetcher = void 0;
4
4
  const invariant_1 = require("@apollo/client/utilities/invariant");
5
5
  const checkFetcher = (fetcher) => {
6
- (0, invariant_1.invariant)(fetcher || typeof fetch !== "undefined", 59);
6
+ (0, invariant_1.invariant)(fetcher || typeof fetch !== "undefined", 61);
7
7
  };
8
8
  exports.checkFetcher = checkFetcher;
9
9
  //# sourceMappingURL=checkFetcher.cjs.map
@@ -37,7 +37,7 @@ async function* consumeMultipartBody(response) {
37
37
  /;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i);
38
38
  const boundary = "\r\n--" + (match?.findLast((val) => !!val) || "-");
39
39
  let buffer = "";
40
- (0, invariant_1.invariant)(response.body && typeof response.body.getReader === "function", 60);
40
+ (0, invariant_1.invariant)(response.body && typeof response.body.getReader === "function", 62);
41
41
  const stream = response.body;
42
42
  const reader = stream.getReader();
43
43
  let done = false;
@@ -70,7 +70,7 @@ class PersistedQueryLink extends link_1.ApolloLink {
70
70
  // hashing with something other than SHA-256.
71
71
  (0, invariant_1.invariant)(options &&
72
72
  (typeof options.sha256 === "function" ||
73
- typeof options.generateHash === "function"), 57);
73
+ typeof options.generateHash === "function"), 59);
74
74
  const { sha256,
75
75
  // If both a `sha256` and `generateHash` option are provided, the
76
76
  // `sha256` option will be ignored. Developers can configure and
@@ -96,7 +96,7 @@ class PersistedQueryLink extends link_1.ApolloLink {
96
96
  return hash;
97
97
  }
98
98
  super((operation, forward) => {
99
- (0, invariant_1.invariant)(forward, 58);
99
+ (0, invariant_1.invariant)(forward, 60);
100
100
  const { query } = operation;
101
101
  return new rxjs_1.Observable((observer) => {
102
102
  let subscription;
@@ -39,7 +39,7 @@ class WebSocketLink extends link_1.ApolloLink {
39
39
  constructor(paramsOrClient) {
40
40
  super();
41
41
  if (environment_1.__DEV__) {
42
- __DEV__ && invariant_1.invariant.warn(56);
42
+ __DEV__ && invariant_1.invariant.warn(58);
43
43
  }
44
44
  if (paramsOrClient instanceof subscriptions_transport_ws_1.SubscriptionClient) {
45
45
  this.subscriptionClient = paramsOrClient;