@apollo/client 4.2.0-alpha.2 → 4.2.0-alpha.4

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 (147) hide show
  1. package/CHANGELOG.md +240 -0
  2. package/__cjs/cache/core/cache.cjs +1 -1
  3. package/__cjs/cache/inmemory/entityStore.cjs +3 -3
  4. package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
  5. package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  6. package/__cjs/cache/inmemory/policies.cjs +4 -4
  7. package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
  8. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  9. package/__cjs/core/ApolloClient.cjs +52 -20
  10. package/__cjs/core/ApolloClient.cjs.map +1 -1
  11. package/__cjs/core/ApolloClient.d.cts +159 -22
  12. package/__cjs/core/ObservableQuery.cjs +7 -7
  13. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  14. package/__cjs/core/ObservableQuery.d.cts +20 -1
  15. package/__cjs/core/QueryManager.cjs +12 -12
  16. package/__cjs/core/QueryManager.cjs.map +1 -1
  17. package/__cjs/core/RefetchEventManager.cjs +134 -0
  18. package/__cjs/core/RefetchEventManager.cjs.map +1 -0
  19. package/__cjs/core/RefetchEventManager.d.cts +130 -0
  20. package/__cjs/core/index.cjs +7 -1
  21. package/__cjs/core/index.cjs.map +1 -1
  22. package/__cjs/core/index.d.cts +4 -1
  23. package/__cjs/core/refetchSources/onlineSource.cjs +10 -0
  24. package/__cjs/core/refetchSources/onlineSource.cjs.map +1 -0
  25. package/__cjs/core/refetchSources/onlineSource.d.cts +3 -0
  26. package/__cjs/core/refetchSources/windowFocusSource.cjs +13 -0
  27. package/__cjs/core/refetchSources/windowFocusSource.cjs.map +1 -0
  28. package/__cjs/core/refetchSources/windowFocusSource.d.cts +3 -0
  29. package/__cjs/core/types.d.cts +20 -0
  30. package/__cjs/invariantErrorCodes.cjs +69 -44
  31. package/__cjs/link/ws/index.cjs +9 -1
  32. package/__cjs/link/ws/index.cjs.map +1 -1
  33. package/__cjs/link/ws/index.d.cts +1 -1
  34. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  35. package/__cjs/react/hooks/useBackgroundQuery.d.cts +1486 -66
  36. package/__cjs/react/hooks/useLazyQuery.cjs +1 -0
  37. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  38. package/__cjs/react/hooks/useLazyQuery.d.cts +366 -40
  39. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  40. package/__cjs/react/hooks/useLoadableQuery.d.cts +512 -50
  41. package/__cjs/react/hooks/useMutation.cjs +5 -48
  42. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  43. package/__cjs/react/hooks/useMutation.d.cts +239 -130
  44. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  45. package/__cjs/react/hooks/useQuery.d.cts +590 -41
  46. package/__cjs/react/hooks/useSubscription.cjs +1 -1
  47. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  48. package/__cjs/react/hooks/useSubscription.d.cts +2 -2
  49. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  50. package/__cjs/react/hooks/useSuspenseQuery.d.cts +754 -46
  51. package/__cjs/react/internal/cache/QueryReference.cjs +1 -0
  52. package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
  53. package/__cjs/react/internal/cache/QueryReference.d.cts +1 -1
  54. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  55. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +20 -1
  56. package/__cjs/react/types/types.documentation.d.cts +19 -0
  57. package/__cjs/version.cjs +1 -1
  58. package/cache/core/cache.js +1 -1
  59. package/cache/inmemory/entityStore.js +3 -3
  60. package/cache/inmemory/entityStore.js.map +1 -1
  61. package/cache/inmemory/key-extractor.js +1 -1
  62. package/cache/inmemory/policies.js +4 -4
  63. package/cache/inmemory/readFromStore.js +2 -2
  64. package/cache/inmemory/writeToStore.js +4 -4
  65. package/core/ApolloClient.d.ts +159 -22
  66. package/core/ApolloClient.js +53 -21
  67. package/core/ApolloClient.js.map +1 -1
  68. package/core/ObservableQuery.d.ts +20 -1
  69. package/core/ObservableQuery.js +7 -7
  70. package/core/ObservableQuery.js.map +1 -1
  71. package/core/QueryManager.js +12 -12
  72. package/core/QueryManager.js.map +1 -1
  73. package/core/RefetchEventManager.d.ts +130 -0
  74. package/core/RefetchEventManager.js +126 -0
  75. package/core/RefetchEventManager.js.map +1 -0
  76. package/core/index.d.ts +4 -1
  77. package/core/index.js +3 -0
  78. package/core/index.js.map +1 -1
  79. package/core/refetchSources/onlineSource.d.ts +3 -0
  80. package/core/refetchSources/onlineSource.js +6 -0
  81. package/core/refetchSources/onlineSource.js.map +1 -0
  82. package/core/refetchSources/windowFocusSource.d.ts +3 -0
  83. package/core/refetchSources/windowFocusSource.js +9 -0
  84. package/core/refetchSources/windowFocusSource.js.map +1 -0
  85. package/core/types.d.ts +20 -0
  86. package/core/types.js.map +1 -1
  87. package/invariantErrorCodes.js +69 -44
  88. package/link/ws/index.d.ts +1 -1
  89. package/link/ws/index.js +9 -1
  90. package/link/ws/index.js.map +1 -1
  91. package/package.json +3 -7
  92. package/react/hooks/useBackgroundQuery.d.ts +1486 -66
  93. package/react/hooks/useBackgroundQuery.js.map +1 -1
  94. package/react/hooks/useLazyQuery.d.ts +366 -40
  95. package/react/hooks/useLazyQuery.js +1 -0
  96. package/react/hooks/useLazyQuery.js.map +1 -1
  97. package/react/hooks/useLoadableQuery.d.ts +512 -50
  98. package/react/hooks/useLoadableQuery.js.map +1 -1
  99. package/react/hooks/useMutation.d.ts +239 -130
  100. package/react/hooks/useMutation.js +5 -48
  101. package/react/hooks/useMutation.js.map +1 -1
  102. package/react/hooks/useQuery.d.ts +590 -41
  103. package/react/hooks/useQuery.js.map +1 -1
  104. package/react/hooks/useSubscription.d.ts +2 -2
  105. package/react/hooks/useSubscription.js +1 -1
  106. package/react/hooks/useSubscription.js.map +1 -1
  107. package/react/hooks/useSuspenseQuery.d.ts +754 -46
  108. package/react/hooks/useSuspenseQuery.js.map +1 -1
  109. package/react/hooks-compiled/useBackgroundQuery.d.ts +1486 -66
  110. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  111. package/react/hooks-compiled/useLazyQuery.d.ts +366 -40
  112. package/react/hooks-compiled/useLazyQuery.js +1 -0
  113. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  114. package/react/hooks-compiled/useLoadableQuery.d.ts +512 -50
  115. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  116. package/react/hooks-compiled/useMutation.d.ts +239 -130
  117. package/react/hooks-compiled/useMutation.js +4 -47
  118. package/react/hooks-compiled/useMutation.js.map +1 -1
  119. package/react/hooks-compiled/useQuery.d.ts +590 -41
  120. package/react/hooks-compiled/useQuery.js.map +1 -1
  121. package/react/hooks-compiled/useSubscription.d.ts +2 -2
  122. package/react/hooks-compiled/useSubscription.js +1 -1
  123. package/react/hooks-compiled/useSubscription.js.map +1 -1
  124. package/react/hooks-compiled/useSuspenseQuery.d.ts +754 -46
  125. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  126. package/react/internal/cache/QueryReference.d.ts +1 -1
  127. package/react/internal/cache/QueryReference.js +1 -0
  128. package/react/internal/cache/QueryReference.js.map +1 -1
  129. package/react/query-preloader/createQueryPreloader.d.ts +20 -1
  130. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  131. package/react/types/types.documentation.d.ts +19 -0
  132. package/react/types/types.documentation.js.map +1 -1
  133. package/skills/apollo-client/SKILL.md +168 -0
  134. package/skills/apollo-client/references/caching.md +560 -0
  135. package/skills/apollo-client/references/error-handling.md +350 -0
  136. package/skills/apollo-client/references/fragments.md +804 -0
  137. package/skills/apollo-client/references/integration-client.md +336 -0
  138. package/skills/apollo-client/references/integration-nextjs.md +325 -0
  139. package/skills/apollo-client/references/integration-react-router.md +256 -0
  140. package/skills/apollo-client/references/integration-tanstack-start.md +378 -0
  141. package/skills/apollo-client/references/mutations.md +549 -0
  142. package/skills/apollo-client/references/queries.md +416 -0
  143. package/skills/apollo-client/references/state-management.md +428 -0
  144. package/skills/apollo-client/references/suspense-hooks.md +773 -0
  145. package/skills/apollo-client/references/troubleshooting.md +487 -0
  146. package/skills/apollo-client/references/typescript-codegen.md +133 -0
  147. package/version.js +1 -1
@@ -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
- 70: {
372
+ 72: {
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
- 71: {
382
+ 73: {
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
- 72: {
391
+ 74: {
392
392
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
393
393
  condition: "options.query",
394
394
 
@@ -396,164 +396,164 @@ const client = new ApolloClient({
396
396
  "in the query option."
397
397
  },
398
398
 
399
- 73: {
399
+ 75: {
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
- 74: {
405
+ 76: {
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
- 75: {
411
+ 77: {
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
- 76: {
417
+ 78: {
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
- 77: {
423
+ 79: {
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
- 78: {
429
+ 80: {
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
- 80: {
435
+ 82: {
436
436
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
437
437
  condition: "fetchPolicy === \"standby\"",
438
438
  message: "The `variablesUnknown` option can only be used together with a `standby` fetch policy."
439
439
  },
440
440
 
441
- 82: {
441
+ 84: {
442
442
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
443
443
  condition: "this.options.fetchPolicy !== \"cache-only\"",
444
444
  message: "Cannot execute `fetchMore` for 'cache-only' query '%s'. Please use a different fetch policy."
445
445
  },
446
446
 
447
- 83: {
447
+ 85: {
448
448
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
449
449
  condition: "updateQuery",
450
450
  message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
451
451
  },
452
452
 
453
- 87: {
453
+ 89: {
454
454
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
455
455
  message: "QueryManager stopped while query was in flight"
456
456
  },
457
457
 
458
- 88: {
458
+ 90: {
459
459
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
460
460
  condition: "this.localState",
461
461
  message: "Mutation '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
462
462
  },
463
463
 
464
- 89: {
464
+ 91: {
465
465
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
466
466
  message: "Store reset while query was in flight (not completed in link chain)"
467
467
  },
468
468
 
469
- 92: {
469
+ 94: {
470
470
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
471
471
  condition: "!this.getDocumentInfo(query).hasClientExports || this.localState",
472
472
  message: "Subscription '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
473
473
  },
474
474
 
475
- 93: {
475
+ 95: {
476
476
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
477
477
  condition: "this.localState",
478
478
  message: "%s '%s' contains `@client` fields but local state has not been configured."
479
479
  },
480
480
 
481
- 94: {
481
+ 96: {
482
482
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
483
483
  condition: "!hasIncrementalDirective",
484
484
  message: "%s '%s' contains `@client` and `@defer` directives. These cannot be used together."
485
485
  },
486
486
 
487
- 95: {
487
+ 97: {
488
488
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
489
489
  condition: "this.localState",
490
490
  message: "Query '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
491
491
  },
492
492
 
493
- 97: {
493
+ 99: {
494
494
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
495
495
  condition: "this.localState",
496
496
  message: "Query '%s' contains `@client` fields but local state has not been configured."
497
497
  },
498
498
 
499
- 98: {
499
+ 100: {
500
500
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
501
501
  condition: "didEmitValue",
502
502
  message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
503
503
  },
504
504
 
505
- 99: {
505
+ 104: {
506
506
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
507
507
  condition: "typeof dataId === \"string\"",
508
508
  message: "store.merge expects a string ID"
509
509
  },
510
510
 
511
- 102: {
511
+ 107: {
512
512
  file: "@apollo/client/__cjs/cache/inmemory/key-extractor.cjs",
513
513
  condition: "extracted !== void 0",
514
514
  message: `Missing field '%s' while extracting keyFields from %s`
515
515
  },
516
516
 
517
- 103: {
517
+ 108: {
518
518
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
519
519
  condition: "!old || old === which",
520
520
  message: `Cannot change root %s __typename more than once`
521
521
  },
522
522
 
523
- 106: {
523
+ 111: {
524
524
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
525
525
  message: "Cannot automatically merge arrays"
526
526
  },
527
527
 
528
- 107: {
528
+ 112: {
529
529
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
530
530
  message: `No fragment named %s`
531
531
  },
532
532
 
533
- 108: {
533
+ 113: {
534
534
  file: "@apollo/client/__cjs/cache/inmemory/readFromStore.cjs",
535
535
  condition: "!(0, utilities_1.isReference)(value)",
536
536
  message: `Missing selection set for object of type %s returned for query field %s`
537
537
  },
538
538
 
539
- 109: {
539
+ 114: {
540
540
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
541
541
  message: `Could not identify object %s`
542
542
  },
543
543
 
544
- 111: {
544
+ 116: {
545
545
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
546
546
  message: `No fragment named %s`
547
547
  }
548
548
  };
549
549
 
550
550
  exports.devDebug = {
551
- 79: {
551
+ 81: {
552
552
  file: "@apollo/client/__cjs/core/ApolloClient.cjs",
553
553
  message: `In client.refetchQueries, Promise.all promise rejected with error %o`
554
554
  },
555
555
 
556
- 86: {
556
+ 88: {
557
557
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
558
558
  message: `Missing cache result fields: %o`
559
559
  }
@@ -631,34 +631,59 @@ exports.devWarn = {
631
631
  "If you are using a split link, ensure each branch contains a terminating link that handles the request."
632
632
  },
633
633
 
634
- 81: {
634
+ 70: {
635
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
636
+ message: "`refetchOn` was set on query '%s' but no `RefetchEventManager` is configured on this `ApolloClient` instance. This option has no effect. Pass a `RefetchEventManager` instance to the `refetchEventManager` option on the `ApolloClient` constructor."
637
+ },
638
+
639
+ 71: {
640
+ file: "@apollo/client/__cjs/core/ApolloClient.cjs",
641
+ message: "`refetchOn` references the '%s' event on query '%s' but no source is configured for it on the `RefetchEventManager`. This event will never fire. Add a source for the event to the `sources` option or call `setEventSource` on the refetch event manager."
642
+ },
643
+
644
+ 83: {
635
645
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
636
646
 
637
647
  message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
638
648
  Did you mean to call refetch(variables) instead of refetch({ variables })?`
639
649
  },
640
650
 
641
- 85: {
651
+ 87: {
642
652
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
643
653
  message: "Cannot poll on 'cache-only' query '%s' and as such, polling is disabled. Please use a different fetch policy."
644
654
  },
645
655
 
646
- 90: {
656
+ 92: {
647
657
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
648
658
  message: `Unknown query named "%s" requested in refetchQueries options.include array`
649
659
  },
650
660
 
651
- 91: {
661
+ 93: {
652
662
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
653
663
  message: `Unknown anonymous query requested in refetchQueries options.include array`
654
664
  },
655
665
 
656
- 96: {
666
+ 98: {
657
667
  file: "@apollo/client/__cjs/core/QueryManager.cjs",
658
668
  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.'
659
669
  },
660
670
 
661
- 100: {
671
+ 101: {
672
+ file: "@apollo/client/__cjs/core/RefetchEventManager.cjs",
673
+ message: "Connected an `ApolloClient` instance to a `RefetchEventManager` that was already connected to a different `ApolloClient`. The previous client has been disconnected and will no longer receive refetch events from this manager."
674
+ },
675
+
676
+ 102: {
677
+ file: "@apollo/client/__cjs/core/RefetchEventManager.cjs",
678
+ message: "Received '%s' event but an `ApolloClient` instance is not connected to the `RefetchEventManager`. No queries will refetch. Pass the manager to the `refetchEventManager` option on the `ApolloClient` constructor."
679
+ },
680
+
681
+ 103: {
682
+ file: "@apollo/client/__cjs/core/RefetchEventManager.cjs",
683
+ message: "Received '%s' event but no source is configured for it on the `RefetchEventManager`. No queries will refetch. Add the event to the `sources` option or call `setEventSource`."
684
+ },
685
+
686
+ 105: {
662
687
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
663
688
 
664
689
  message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
@@ -666,24 +691,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
666
691
  "`toReference(object, true)`"
667
692
  },
668
693
 
669
- 101: {
694
+ 106: {
670
695
  file: "@apollo/client/__cjs/cache/inmemory/entityStore.cjs",
671
696
 
672
697
  message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
673
698
  "Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
674
699
  },
675
700
 
676
- 104: {
701
+ 109: {
677
702
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
678
703
  message: `Inferring subtype %s of supertype %s`
679
704
  },
680
705
 
681
- 105: {
706
+ 110: {
682
707
  file: "@apollo/client/__cjs/cache/inmemory/policies.cjs",
683
708
  message: `Undefined 'from' passed to readField with arguments %s`
684
709
  },
685
710
 
686
- 112: {
711
+ 117: {
687
712
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
688
713
 
689
714
  message: `Cache data may be lost when replacing the %s field of a %s object.
@@ -702,7 +727,7 @@ For more information about these options, please refer to the documentation:
702
727
  `
703
728
  },
704
729
 
705
- 113: {
730
+ 118: {
706
731
  file: "@apollo/client/__cjs/cache/core/cache.cjs",
707
732
  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."
708
733
  }
@@ -719,12 +744,12 @@ exports.devError = {
719
744
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
720
745
  },
721
746
 
722
- 84: {
747
+ 86: {
723
748
  file: "@apollo/client/__cjs/core/ObservableQuery.cjs",
724
749
  message: "Unhandled GraphQL subscription error"
725
750
  },
726
751
 
727
- 110: {
752
+ 115: {
728
753
  file: "@apollo/client/__cjs/cache/inmemory/writeToStore.cjs",
729
754
  message: `Missing field '%s' while writing result %o`
730
755
  }
@@ -5,6 +5,7 @@ const {
5
5
 
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.WebSocketLink = void 0;
8
+ const rxjs_1 = require("rxjs");
8
9
  const subscriptions_transport_ws_1 = require("subscriptions-transport-ws");
9
10
  const link_1 = require("@apollo/client/link");
10
11
  const environment_1 = require("@apollo/client/utilities/environment");
@@ -49,7 +50,14 @@ class WebSocketLink extends link_1.ApolloLink {
49
50
  }
50
51
  }
51
52
  request(operation) {
52
- return this.subscriptionClient.request(operation);
53
+ return new rxjs_1.Observable((observer) => {
54
+ const subscription = this.subscriptionClient
55
+ .request(operation)
56
+ .subscribe(observer);
57
+ return () => {
58
+ subscription.unsubscribe();
59
+ };
60
+ });
53
61
  }
54
62
  }
55
63
  exports.WebSocketLink = WebSocketLink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/link/ws/index.ts"],"sourcesContent":["import type { Observable } from \"rxjs\";\nimport type { ClientOptions } from \"subscriptions-transport-ws\";\nimport { SubscriptionClient } from \"subscriptions-transport-ws\";\n\nimport { ApolloLink } from \"@apollo/client/link\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nexport declare namespace WebSocketLink {\n /**\n * Configuration options for creating a `WebSocketLink` instance.\n *\n * @remarks\n *\n * These configuration options are used when creating a `WebSocketLink` without\n * providing an existing `SubscriptionClient` instance. The options are passed\n * directly to the `SubscriptionClient` constructor from the `subscriptions-transport-ws`\n * library.\n */\n export interface Configuration {\n /**\n * The WebSocket endpoint URI to connect to.\n *\n * This should be a valid WebSocket URI (starting with `ws://` or `wss://`)\n * that points to your GraphQL subscription endpoint.\n *\n * @example \"ws://localhost:4000/subscriptions\"\n * @example \"wss://api.example.com/graphql\"\n */\n uri: string;\n\n /**\n * Configuration options passed to the underlying `SubscriptionClient`.\n *\n * These options configure the WebSocket connection behavior, including\n * reconnection settings, connection parameters, and event handlers.\n *\n * For a complete list of available options, see the\n * [supported `subscriptions-transport-ws` options](https://github.com/apollographql/subscriptions-transport-ws/blob/master/src/client.ts#L61-L71).\n */\n options?: ClientOptions;\n\n /**\n * A custom WebSocket implementation to use for the connection.\n *\n * This is useful in environments that don't have native WebSocket support.\n * You can provide a WebSocket polyfill or implementation that conforms to\n * the W3C WebSocket API.\n *\n * @example\n *\n * ```ts\n * import WebSocket from \"ws\";\n *\n * const wsLink = new WebSocketLink({\n * uri: \"ws://localhost:4000/subscriptions\",\n * webSocketImpl: WebSocket,\n * });\n * ```\n */\n webSocketImpl?: any;\n }\n}\n\n/**\n * `WebSocketLink` is a terminating link that executes GraphQL operations over\n * WebSocket connections using the `subscriptions-transport-ws` library. It's\n * primarily used for GraphQL subscriptions but can also handle queries and\n * mutations.\n *\n * @example\n *\n * ```ts\n * import { WebSocketLink } from \"@apollo/client/link/ws\";\n * import { SubscriptionClient } from \"subscriptions-transport-ws\";\n *\n * const wsLink = new WebSocketLink(\n * new SubscriptionClient(\"ws://localhost:4000/subscriptions\", {\n * reconnect: true,\n * })\n * );\n * ```\n *\n * @deprecated `WebSocketLink` uses the deprecated and unmaintained\n * `subscriptions-transport-ws` library. This link is no longer maintained and\n * will be removed in a future major version of Apollo Client. We recommend\n * switching to `GraphQLWsLink`, which uses the [`graphql-ws` library](https://the-guild.dev/graphql/ws) to\n * send GraphQL operations through WebSocket connections.\n */\nexport class WebSocketLink extends ApolloLink {\n private subscriptionClient: SubscriptionClient;\n\n constructor(\n paramsOrClient: WebSocketLink.Configuration | SubscriptionClient\n ) {\n super();\n\n if (__DEV__) {\n invariant.warn(\n \"`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).\"\n );\n }\n\n if (paramsOrClient instanceof SubscriptionClient) {\n this.subscriptionClient = paramsOrClient;\n } else {\n this.subscriptionClient = new SubscriptionClient(\n paramsOrClient.uri,\n paramsOrClient.options,\n paramsOrClient.webSocketImpl\n );\n }\n }\n\n public request(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result> {\n return this.subscriptionClient.request(\n operation\n ) as Observable<ApolloLink.Result>;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,EAAA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,C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CA,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;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/link/ws/index.ts"],"sourcesContent":["import { Observable } from \"rxjs\";\nimport type { ClientOptions } from \"subscriptions-transport-ws\";\nimport { SubscriptionClient } from \"subscriptions-transport-ws\";\n\nimport { ApolloLink } from \"@apollo/client/link\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nexport declare namespace WebSocketLink {\n /**\n * Configuration options for creating a `WebSocketLink` instance.\n *\n * @remarks\n *\n * These configuration options are used when creating a `WebSocketLink` without\n * providing an existing `SubscriptionClient` instance. The options are passed\n * directly to the `SubscriptionClient` constructor from the `subscriptions-transport-ws`\n * library.\n */\n export interface Configuration {\n /**\n * The WebSocket endpoint URI to connect to.\n *\n * This should be a valid WebSocket URI (starting with `ws://` or `wss://`)\n * that points to your GraphQL subscription endpoint.\n *\n * @example \"ws://localhost:4000/subscriptions\"\n * @example \"wss://api.example.com/graphql\"\n */\n uri: string;\n\n /**\n * Configuration options passed to the underlying `SubscriptionClient`.\n *\n * These options configure the WebSocket connection behavior, including\n * reconnection settings, connection parameters, and event handlers.\n *\n * For a complete list of available options, see the\n * [supported `subscriptions-transport-ws` options](https://github.com/apollographql/subscriptions-transport-ws/blob/master/src/client.ts#L61-L71).\n */\n options?: ClientOptions;\n\n /**\n * A custom WebSocket implementation to use for the connection.\n *\n * This is useful in environments that don't have native WebSocket support.\n * You can provide a WebSocket polyfill or implementation that conforms to\n * the W3C WebSocket API.\n *\n * @example\n *\n * ```ts\n * import WebSocket from \"ws\";\n *\n * const wsLink = new WebSocketLink({\n * uri: \"ws://localhost:4000/subscriptions\",\n * webSocketImpl: WebSocket,\n * });\n * ```\n */\n webSocketImpl?: any;\n }\n}\n\n/**\n * `WebSocketLink` is a terminating link that executes GraphQL operations over\n * WebSocket connections using the `subscriptions-transport-ws` library. It's\n * primarily used for GraphQL subscriptions but can also handle queries and\n * mutations.\n *\n * @example\n *\n * ```ts\n * import { WebSocketLink } from \"@apollo/client/link/ws\";\n * import { SubscriptionClient } from \"subscriptions-transport-ws\";\n *\n * const wsLink = new WebSocketLink(\n * new SubscriptionClient(\"ws://localhost:4000/subscriptions\", {\n * reconnect: true,\n * })\n * );\n * ```\n *\n * @deprecated `WebSocketLink` uses the deprecated and unmaintained\n * `subscriptions-transport-ws` library. This link is no longer maintained and\n * will be removed in a future major version of Apollo Client. We recommend\n * switching to `GraphQLWsLink`, which uses the [`graphql-ws` library](https://the-guild.dev/graphql/ws) to\n * send GraphQL operations through WebSocket connections.\n */\nexport class WebSocketLink extends ApolloLink {\n private subscriptionClient: SubscriptionClient;\n\n constructor(\n paramsOrClient: WebSocketLink.Configuration | SubscriptionClient\n ) {\n super();\n\n if (__DEV__) {\n invariant.warn(\n \"`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).\"\n );\n }\n\n if (paramsOrClient instanceof SubscriptionClient) {\n this.subscriptionClient = paramsOrClient;\n } else {\n this.subscriptionClient = new SubscriptionClient(\n paramsOrClient.uri,\n paramsOrClient.options,\n paramsOrClient.webSocketImpl\n );\n }\n }\n\n public request(\n operation: ApolloLink.Operation\n ): Observable<ApolloLink.Result> {\n return new Observable((observer) => {\n const subscription = this.subscriptionClient\n .request(operation)\n .subscribe(observer);\n\n return () => {\n subscription.unsubscribe();\n };\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,C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CAAA,CAAA,CAAA,CAA0B;gBAC1B,CAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,CAAC,CAAnB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2B,CAAC;YAEtB,CAAN,CAAA,CAAA,CAAA,CAAA,EAAa,CAAb,EAAgB,CAAhB,EAAA;gBACQ,CAAR,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,CAAC,CAArB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAhC,CAAkC;YAC5B,CAAC;QACH,CAAC,CAAC;IACJ;AACF;AAtCA,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;"}
@@ -1,4 +1,4 @@
1
- import type { Observable } from "rxjs";
1
+ import { Observable } from "rxjs";
2
2
  import type { ClientOptions } from "subscriptions-transport-ws";
3
3
  import { SubscriptionClient } from "subscriptions-transport-ws";
4
4
  import { ApolloLink } from "@apollo/client/link";
@@ -1 +1 @@
1
- {"version":3,"file":"useBackgroundQuery.cjs","sources":["../../../../src/react/hooks/useBackgroundQuery.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport type {\n ApolloClient,\n DataState,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { SubscribeToMoreFunction } from \"@apollo/client\";\nimport type { QueryRef } from \"@apollo/client/react\";\nimport type {\n FetchMoreFunction,\n RefetchFunction,\n} from \"@apollo/client/react/internal\";\nimport {\n getSuspenseCache,\n unwrapQueryRef,\n updateWrappedQueryRef,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n DocumentationTypes as UtilityDocumentationTypes,\n NoInfer,\n OptionWithFallback,\n SignatureStyle,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { SkipToken } from \"./constants.js\";\nimport { useSuspenseHookCacheKey, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useWatchQueryOptions } from \"./useSuspenseQuery.js\";\n\nexport declare namespace useBackgroundQuery {\n import _self = useBackgroundQuery;\n export type FetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n >;\n\n export namespace Base {\n export interface Options {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#client:member} */\n client?: ApolloClient;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy_suspense:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: FetchPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#queryKey:member} */\n queryKey?: string | number | any[];\n\n /**\n * {@inheritDoc @apollo/client!QueryOptionsDocumentation#skip_deprecated:member}\n *\n * @example Recommended usage of `skipToken`:\n *\n * ```ts\n * import { skipToken, useBackgroundQuery } from \"@apollo/client\";\n *\n * const [queryRef] = useBackgroundQuery(\n * query,\n * id ? { variables: { id } } : skipToken\n * );\n * ```\n */\n skip?: boolean;\n }\n }\n\n export type Options<\n TVariables extends OperationVariables = OperationVariables,\n > = Base.Options & VariablesOption<TVariables>;\n\n export namespace DocumentationTypes {\n namespace useBackgroundQuery {\n export interface Options<\n TVariables extends OperationVariables = OperationVariables,\n > extends Base.Options,\n UtilityDocumentationTypes.VariableOptions<TVariables> {}\n }\n }\n\n export interface Result<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > {\n /** {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)} */\n subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;\n\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @remarks\n * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).\n */\n fetchMore: FetchMoreFunction<TData, TVariables>;\n\n /**\n * {@inheritDoc @apollo/client!QueryResultDocumentation#refetch:member}\n *\n * @remarks\n * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).\n */\n refetch: RefetchFunction<TData, TVariables>;\n }\n\n namespace DocumentationTypes {\n namespace useBackgroundQuery {\n export interface Result<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > extends _self.Result<TData, TVariables> {}\n }\n }\n\n export interface DefaultOptions\n extends ApolloClient.DefaultOptions.WatchQuery.Calculated {\n skip: false;\n }\n\n export type ResultForOptions<\n TData,\n TVariables extends OperationVariables,\n TOptions extends Record<string, never> | Options<TVariables> | SkipToken,\n > = [\n queryRef: TOptions extends any ?\n TOptions extends SkipToken ?\n undefined\n : | QueryRef<\n TData,\n TVariables,\n | \"complete\"\n | \"streaming\"\n | (\n | (OptionWithFallback<\n TOptions,\n DefaultOptions,\n \"errorPolicy\"\n > extends \"none\" ?\n never\n : \"empty\")\n | (OptionWithFallback<\n TOptions,\n DefaultOptions,\n \"returnPartialData\"\n > extends false ?\n never\n : \"partial\")\n )\n >\n | (OptionWithFallback<TOptions, DefaultOptions, \"skip\"> extends false ?\n never\n : undefined)\n : never,\n result: useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n export namespace DocumentationTypes {\n /**\n * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).\n *\n * @returns A tuple containing:\n *\n * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.\n * 2. An object containing helper functions for the query:\n * - `refetch`: A function to re-execute the query\n * - `fetchMore`: A function to fetch more results for pagination\n * - `subscribeToMore`: A function to subscribe to updates\n *\n * @example\n *\n * ```jsx\n * import { Suspense } from \"react\";\n * import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\";\n * import { useBackgroundQuery, useReadQuery } from \"@apollo/client/react\";\n *\n * const query = gql`\n * foo {\n * bar\n * }\n * `;\n *\n * const client = new ApolloClient({\n * link: new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n * cache: new InMemoryCache(),\n * });\n *\n * function SuspenseFallback() {\n * return <div>Loading...</div>;\n * }\n *\n * function Child({ queryRef }) {\n * const { data } = useReadQuery(queryRef);\n *\n * return <div>{data.foo.bar}</div>;\n * }\n *\n * function Parent() {\n * const [queryRef] = useBackgroundQuery(query);\n *\n * return (\n * <Suspense fallback={<SuspenseFallback />}>\n * <Child queryRef={queryRef} />\n * </Suspense>\n * );\n * }\n *\n * function App() {\n * return (\n * <ApolloProvider client={client}>\n * <Parent />\n * </ApolloProvider>\n * );\n * }\n * ```\n *\n * @param query - A GraphQL query document parsed into an AST by `gql`.\n * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.\n */\n export interface useBackgroundQuery {\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<TVariables>\n ): [\n QueryRef<TData, TVariables> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n\n /**\n * @deprecated Avoid manually specifying generics on `useBackgroundQuery`.\n * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.\n *\n * {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)}\n */\n export interface useBackgroundQuery_Deprecated {\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<TVariables>\n ): [\n QueryRef<TData, TVariables> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n }\n\n export namespace Signatures {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n export interface Classic {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n /** @deprecated `returnPartialData` has no effect on `no-cache` queries */\n returnPartialData: boolean;\n fetchPolicy: \"no-cache\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"empty\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n >,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"empty\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n returnPartialData: false;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n returnPartialData: boolean;\n }\n ): [\n (\n | QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">\n | undefined\n ),\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken\n ): [undefined, useBackgroundQuery.Result<TData, TVariables>];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | SkipToken\n | (useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n })\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | SkipToken\n | (useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n })\n ): [\n (\n | QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">\n | undefined\n ),\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: useBackgroundQuery.Options<NoInfer<TVariables>>]\n : [options: useBackgroundQuery.Options<NoInfer<TVariables>>]\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [\n options?:\n | SkipToken\n | useBackgroundQuery.Options<NoInfer<TVariables>>,\n ]\n : [options: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>]\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n export interface Modern {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n query: {} extends TVariables ?\n DocumentNode | TypedDocumentNode<TData, TVariables>\n : // this overload should only be accessible if all `TVariables` are optional\n never\n ): useBackgroundQuery.ResultForOptions<\n TData,\n TVariables,\n Record<string, never>\n >;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n skipToken: SkipToken\n ): useBackgroundQuery.ResultForOptions<TData, TVariables, SkipToken>;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useBackgroundQuery.Options<NoInfer<TVariables>> &\n VariablesOption<\n TVariables & {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n }\n >,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ? [options?: TOptions]\n : [options: TOptions]\n ): useBackgroundQuery.ResultForOptions<TData, TVariables, TOptions>;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useBackgroundQuery.Options<NoInfer<TVariables>> &\n VariablesOption<\n TVariables & {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n }\n >,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ? [options?: TOptions | SkipToken]\n : [options: TOptions | SkipToken]\n ): useBackgroundQuery.ResultForOptions<\n TData,\n TVariables,\n TOptions | SkipToken\n >;\n }\n\n export type Evaluated = SignatureStyle extends \"classic\" ? Classic : Modern;\n }\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n export interface Signature extends Signatures.Evaluated {}\n}\n\nexport const useBackgroundQuery: useBackgroundQuery.Signature =\n function useBackgroundQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>\n ): [\n QueryRef<TData, TVariables, DataState<TData>[\"dataState\"]> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ] {\n \"use no memo\";\n return wrapHook(\n \"useBackgroundQuery\",\n useBackgroundQuery_,\n useApolloClient(typeof options === \"object\" ? options.client : undefined)\n )(query, options ?? ({} as any));\n } as any;\n\nfunction useBackgroundQuery_<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TStates extends DataState<TData>[\"dataState\"] = DataState<TData>[\"dataState\"],\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | (SkipToken & Partial<useBackgroundQuery.Options<NoInfer<TVariables>>>)\n | useBackgroundQuery.Options<NoInfer<TVariables>>\n): [\n QueryRef<TData, TVariables, TStates> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n] {\n const client = useApolloClient(options.client);\n const suspenseCache = getSuspenseCache(client);\n const watchQueryOptions = useWatchQueryOptions({ client, query, options });\n const { fetchPolicy } = watchQueryOptions;\n const cacheKey = useSuspenseHookCacheKey(query, options);\n\n // This ref tracks the first time query execution is enabled to determine\n // whether to return a query ref or `undefined`. When initialized\n // in a skipped state (either via `skip: true` or `skipToken`) we return\n // `undefined` for the `queryRef` until the query has been enabled. Once\n // enabled, a query ref is always returned regardless of whether the query is\n // skipped again later.\n const didFetchResult = React.useRef(fetchPolicy !== \"standby\");\n didFetchResult.current ||= fetchPolicy !== \"standby\";\n\n const queryRef = suspenseCache.getQueryRef<TData, TStates>(cacheKey, () =>\n client.watchQuery(\n watchQueryOptions as ApolloClient.WatchQueryOptions<any, any>\n )\n );\n\n const [wrappedQueryRef, setWrappedQueryRef] = React.useState(\n wrapQueryRef(queryRef)\n );\n if (unwrapQueryRef(wrappedQueryRef) !== queryRef) {\n setWrappedQueryRef(wrapQueryRef(queryRef));\n }\n if (queryRef.didChangeOptions(watchQueryOptions)) {\n const promise = queryRef.applyOptions(watchQueryOptions);\n updateWrappedQueryRef(wrappedQueryRef, promise);\n }\n\n // This prevents issues where rerendering useBackgroundQuery after the\n // queryRef has been disposed would cause the hook to return a new queryRef\n // instance since disposal also removes it from the suspense cache. We add\n // the queryRef back in the suspense cache so that the next render will reuse\n // this queryRef rather than initializing a new instance.\n React.useEffect(() => {\n // Since the queryRef is disposed async via `setTimeout`, we have to wait a\n // tick before checking it and adding back to the suspense cache.\n const id = setTimeout(() => {\n if (queryRef.disposed) {\n suspenseCache.add(cacheKey, queryRef);\n }\n });\n\n return () => clearTimeout(id);\n // Omitting the deps is intentional. This avoids stale closures and the\n // conditional ensures we aren't running the logic on each render.\n });\n\n const fetchMore: FetchMoreFunction<TData, TVariables> = React.useCallback(\n (options) => {\n const promise = queryRef.fetchMore(options);\n\n setWrappedQueryRef(wrapQueryRef(queryRef));\n\n return promise;\n },\n [queryRef]\n );\n\n const refetch: RefetchFunction<TData, TVariables> = React.useCallback(\n (variables) => {\n const promise = queryRef.refetch(variables);\n\n setWrappedQueryRef(wrapQueryRef(queryRef));\n\n return promise;\n },\n [queryRef]\n );\n\n React.useEffect(() => queryRef.softRetain(), [queryRef]);\n\n return [\n didFetchResult.current ? wrappedQueryRef : void 0,\n {\n fetchMore,\n refetch,\n // TODO: The internalQueryRef doesn't have TVariables' type information so we have to cast it here\n subscribeToMore: queryRef.observable\n .subscribeToMore as SubscribeToMoreFunction<TData, TVariables>,\n },\n ];\n}\n"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAmBA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAeA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,uBAAA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,EAAE,CAAvB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B,CAAC,CAAhC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;gBACA,CAAS,CAAT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsE;QACtE,CAAK;IACL,CAAG;AACH;"}
1
+ {"version":3,"file":"useBackgroundQuery.cjs","sources":["../../../../src/react/hooks/useBackgroundQuery.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport type {\n ApolloClient,\n DataState,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchOn,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { SubscribeToMoreFunction } from \"@apollo/client\";\nimport type { QueryRef } from \"@apollo/client/react\";\nimport type {\n FetchMoreFunction,\n RefetchFunction,\n} from \"@apollo/client/react/internal\";\nimport {\n getSuspenseCache,\n unwrapQueryRef,\n updateWrappedQueryRef,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n DocumentationTypes as UtilityDocumentationTypes,\n NoInfer,\n OptionWithFallback,\n SignatureStyle,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\n\nimport type { SkipToken } from \"./constants.js\";\nimport { useSuspenseHookCacheKey, wrapHook } from \"./internal/index.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\nimport { useWatchQueryOptions } from \"./useSuspenseQuery.js\";\n\nexport declare namespace useBackgroundQuery {\n import _self = useBackgroundQuery;\n export type FetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n >;\n\n export namespace Base {\n export interface Options {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#client:member} */\n client?: ApolloClient;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy_suspense:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: FetchPolicy;\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#queryKey:member} */\n queryKey?: string | number | any[];\n\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchOn:member} */\n refetchOn?: RefetchOn.Option;\n\n /**\n * {@inheritDoc @apollo/client!QueryOptionsDocumentation#skip_deprecated:member}\n *\n * @example Recommended usage of `skipToken`:\n *\n * ```ts\n * import { skipToken, useBackgroundQuery } from \"@apollo/client\";\n *\n * const [queryRef] = useBackgroundQuery(\n * query,\n * id ? { variables: { id } } : skipToken\n * );\n * ```\n */\n skip?: boolean;\n }\n }\n\n export type Options<\n TVariables extends OperationVariables = OperationVariables,\n > = Base.Options & VariablesOption<TVariables>;\n\n export namespace DocumentationTypes {\n namespace useBackgroundQuery {\n export interface Options<\n TVariables extends OperationVariables = OperationVariables,\n > extends Base.Options,\n UtilityDocumentationTypes.VariableOptions<TVariables> {}\n }\n }\n\n export interface Result<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > {\n /** {@inheritDoc @apollo/client!ObservableQuery#subscribeToMore:member(1)} */\n subscribeToMore: SubscribeToMoreFunction<TData, TVariables>;\n\n /**\n * {@inheritDoc @apollo/client!ObservableQuery#fetchMore:member(1)}\n *\n * @remarks\n * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).\n */\n fetchMore: FetchMoreFunction<TData, TVariables>;\n\n /**\n * {@inheritDoc @apollo/client!QueryResultDocumentation#refetch:member}\n *\n * @remarks\n * Calling this function will cause the component to re-suspend, unless the call site is wrapped in [`startTransition`](https://react.dev/reference/react/startTransition).\n */\n refetch: RefetchFunction<TData, TVariables>;\n }\n\n namespace DocumentationTypes {\n namespace useBackgroundQuery {\n export interface Result<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n > extends _self.Result<TData, TVariables> {}\n }\n }\n\n export interface DefaultOptions\n extends ApolloClient.DefaultOptions.WatchQuery.Calculated {\n skip: false;\n }\n\n export type ResultForOptions<\n TData,\n TVariables extends OperationVariables,\n TOptions extends Record<string, never> | Options<TVariables> | SkipToken,\n > = [\n queryRef: TOptions extends any ?\n TOptions extends SkipToken ?\n undefined\n : | QueryRef<\n TData,\n TVariables,\n | \"complete\"\n | \"streaming\"\n | (\n | (OptionWithFallback<\n TOptions,\n DefaultOptions,\n \"errorPolicy\"\n > extends \"none\" ?\n never\n : \"empty\")\n | (OptionWithFallback<\n TOptions,\n DefaultOptions,\n \"returnPartialData\"\n > extends false ?\n never\n : \"partial\")\n )\n >\n | (OptionWithFallback<TOptions, DefaultOptions, \"skip\"> extends false ?\n never\n : undefined)\n : never,\n result: useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n export namespace DocumentationTypes {\n export interface useBackgroundQuery {\n /**\n * For a detailed explanation of useBackgroundQuery, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).\n *\n * @returns A tuple containing:\n *\n * 1. A `QueryRef` that can be passed to `useReadQuery` to read the query result. The `queryRef` is `undefined` if the query is skipped.\n * 2. An object containing helper functions for the query:\n * - `refetch`: A function to re-execute the query\n * - `fetchMore`: A function to fetch more results for pagination\n * - `subscribeToMore`: A function to subscribe to updates\n *\n * @example\n *\n * ```jsx\n * import { Suspense } from \"react\";\n * import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\";\n * import { useBackgroundQuery, useReadQuery } from \"@apollo/client/react\";\n *\n * const query = gql`\n * foo {\n * bar\n * }\n * `;\n *\n * const client = new ApolloClient({\n * link: new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n * cache: new InMemoryCache(),\n * });\n *\n * function SuspenseFallback() {\n * return <div>Loading...</div>;\n * }\n *\n * function Child({ queryRef }) {\n * const { data } = useReadQuery(queryRef);\n *\n * return <div>{data.foo.bar}</div>;\n * }\n *\n * function Parent() {\n * const [queryRef] = useBackgroundQuery(query);\n *\n * return (\n * <Suspense fallback={<SuspenseFallback />}>\n * <Child queryRef={queryRef} />\n * </Suspense>\n * );\n * }\n *\n * function App() {\n * return (\n * <ApolloProvider client={client}>\n * <Parent />\n * </ApolloProvider>\n * );\n * }\n * ```\n *\n * @param query - A GraphQL query document parsed into an AST by `gql`.\n * @param options - An optional object containing options for the query. Instead of passing a `useBackgroundQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useBackgroundQuery` hook from executing the query or suspending.\n */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<TVariables>\n ): [\n QueryRef<TData, TVariables> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n\n export interface useBackgroundQuery_Deprecated {\n /**\n * @deprecated Avoid manually specifying generics on `useBackgroundQuery`.\n * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.\n *\n * {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)}\n */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<TVariables>\n ): [\n QueryRef<TData, TVariables> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n }\n\n export namespace Signatures {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n export interface Classic {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n /** @deprecated `returnPartialData` has no effect on `no-cache` queries */\n returnPartialData: boolean;\n fetchPolicy: \"no-cache\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"empty\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n >,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"empty\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n returnPartialData: false;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n returnPartialData: boolean;\n }\n ): [\n (\n | QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">\n | undefined\n ),\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: useBackgroundQuery.Options<NoInfer<TVariables>> & {\n skip: boolean;\n }\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken\n ): [undefined, useBackgroundQuery.Result<TData, TVariables>];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | SkipToken\n | (useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: false;\n })\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | SkipToken\n | (useBackgroundQuery.Options<NoInfer<TVariables>> & {\n returnPartialData: boolean;\n })\n ): [\n (\n | QueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">\n | undefined\n ),\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: useBackgroundQuery.Options<NoInfer<TVariables>>]\n : [options: useBackgroundQuery.Options<NoInfer<TVariables>>]\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\">,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [\n options?:\n | SkipToken\n | useBackgroundQuery.Options<NoInfer<TVariables>>,\n ]\n : [options: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>]\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery_Deprecated:call(1)} */\n <\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>\n ): [\n QueryRef<TData, TVariables, \"complete\" | \"streaming\"> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ];\n }\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n export interface Modern {\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n query: {} extends TVariables ?\n DocumentNode | TypedDocumentNode<TData, TVariables>\n : // this overload should only be accessible if all `TVariables` are optional\n never\n ): useBackgroundQuery.ResultForOptions<\n TData,\n TVariables,\n Record<string, never>\n >;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends never,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n skipToken: SkipToken\n ): useBackgroundQuery.ResultForOptions<TData, TVariables, SkipToken>;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useBackgroundQuery.Options<NoInfer<TVariables>> &\n VariablesOption<\n TVariables & {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n }\n >,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ? [options?: TOptions]\n : [options: TOptions]\n ): useBackgroundQuery.ResultForOptions<TData, TVariables, TOptions>;\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends useBackgroundQuery.Options<NoInfer<TVariables>> &\n VariablesOption<\n TVariables & {\n [K in Exclude<\n keyof TOptions[\"variables\"],\n keyof TVariables\n >]?: never;\n }\n >,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ? [options?: TOptions | SkipToken]\n : [options: TOptions | SkipToken]\n ): useBackgroundQuery.ResultForOptions<\n TData,\n TVariables,\n TOptions | SkipToken\n >;\n }\n\n export type Evaluated = SignatureStyle extends \"classic\" ? Classic : Modern;\n }\n\n /** {@inheritDoc @apollo/client/react!useBackgroundQuery.DocumentationTypes.useBackgroundQuery:call(1)} */\n export interface Signature extends Signatures.Evaluated {}\n}\n\nexport const useBackgroundQuery: useBackgroundQuery.Signature =\n function useBackgroundQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options?: SkipToken | useBackgroundQuery.Options<NoInfer<TVariables>>\n ): [\n QueryRef<TData, TVariables, DataState<TData>[\"dataState\"]> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n ] {\n \"use no memo\";\n return wrapHook(\n \"useBackgroundQuery\",\n useBackgroundQuery_,\n useApolloClient(typeof options === \"object\" ? options.client : undefined)\n )(query, options ?? ({} as any));\n } as any;\n\nfunction useBackgroundQuery_<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n TStates extends DataState<TData>[\"dataState\"] = DataState<TData>[\"dataState\"],\n>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options:\n | (SkipToken & Partial<useBackgroundQuery.Options<NoInfer<TVariables>>>)\n | useBackgroundQuery.Options<NoInfer<TVariables>>\n): [\n QueryRef<TData, TVariables, TStates> | undefined,\n useBackgroundQuery.Result<TData, TVariables>,\n] {\n const client = useApolloClient(options.client);\n const suspenseCache = getSuspenseCache(client);\n const watchQueryOptions = useWatchQueryOptions({ client, query, options });\n const { fetchPolicy } = watchQueryOptions;\n const cacheKey = useSuspenseHookCacheKey(query, options);\n\n // This ref tracks the first time query execution is enabled to determine\n // whether to return a query ref or `undefined`. When initialized\n // in a skipped state (either via `skip: true` or `skipToken`) we return\n // `undefined` for the `queryRef` until the query has been enabled. Once\n // enabled, a query ref is always returned regardless of whether the query is\n // skipped again later.\n const didFetchResult = React.useRef(fetchPolicy !== \"standby\");\n didFetchResult.current ||= fetchPolicy !== \"standby\";\n\n const queryRef = suspenseCache.getQueryRef<TData, TStates>(cacheKey, () =>\n client.watchQuery(\n watchQueryOptions as ApolloClient.WatchQueryOptions<any, any>\n )\n );\n\n const [wrappedQueryRef, setWrappedQueryRef] = React.useState(\n wrapQueryRef(queryRef)\n );\n if (unwrapQueryRef(wrappedQueryRef) !== queryRef) {\n setWrappedQueryRef(wrapQueryRef(queryRef));\n }\n if (queryRef.didChangeOptions(watchQueryOptions)) {\n const promise = queryRef.applyOptions(watchQueryOptions);\n updateWrappedQueryRef(wrappedQueryRef, promise);\n }\n\n // This prevents issues where rerendering useBackgroundQuery after the\n // queryRef has been disposed would cause the hook to return a new queryRef\n // instance since disposal also removes it from the suspense cache. We add\n // the queryRef back in the suspense cache so that the next render will reuse\n // this queryRef rather than initializing a new instance.\n React.useEffect(() => {\n // Since the queryRef is disposed async via `setTimeout`, we have to wait a\n // tick before checking it and adding back to the suspense cache.\n const id = setTimeout(() => {\n if (queryRef.disposed) {\n suspenseCache.add(cacheKey, queryRef);\n }\n });\n\n return () => clearTimeout(id);\n // Omitting the deps is intentional. This avoids stale closures and the\n // conditional ensures we aren't running the logic on each render.\n });\n\n const fetchMore: FetchMoreFunction<TData, TVariables> = React.useCallback(\n (options) => {\n const promise = queryRef.fetchMore(options);\n\n setWrappedQueryRef(wrapQueryRef(queryRef));\n\n return promise;\n },\n [queryRef]\n );\n\n const refetch: RefetchFunction<TData, TVariables> = React.useCallback(\n (variables) => {\n const promise = queryRef.refetch(variables);\n\n setWrappedQueryRef(wrapQueryRef(queryRef));\n\n return promise;\n },\n [queryRef]\n );\n\n React.useEffect(() => queryRef.softRetain(), [queryRef]);\n\n return [\n didFetchResult.current ? wrappedQueryRef : void 0,\n {\n fetchMore,\n refetch,\n // TODO: The internalQueryRef doesn't have TVariables' type information so we have to cast it here\n subscribeToMore: queryRef.observable\n .subscribeToMore as SubscribeToMoreFunction<TData, TVariables>,\n },\n ];\n}\n"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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