@apollo/client 4.2.0-alpha.5 → 4.2.0-alpha.7

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 (48) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/__cjs/core/ApolloClient.cjs.map +1 -1
  3. package/__cjs/core/ApolloClient.d.cts +29 -2
  4. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  5. package/__cjs/react/hooks/useBackgroundQuery.d.cts +1019 -19
  6. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  7. package/__cjs/react/hooks/useLazyQuery.d.cts +115 -7
  8. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  9. package/__cjs/react/hooks/useLoadableQuery.d.cts +195 -8
  10. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  11. package/__cjs/react/hooks/useMutation.d.cts +20 -9
  12. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  13. package/__cjs/react/hooks/useQuery.d.cts +280 -11
  14. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  15. package/__cjs/react/hooks/useSuspenseQuery.d.cts +405 -13
  16. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  17. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +395 -123
  18. package/__cjs/version.cjs +1 -1
  19. package/core/ApolloClient.d.ts +29 -2
  20. package/core/ApolloClient.js.map +1 -1
  21. package/package.json +1 -1
  22. package/react/hooks/useBackgroundQuery.d.ts +1019 -19
  23. package/react/hooks/useBackgroundQuery.js.map +1 -1
  24. package/react/hooks/useLazyQuery.d.ts +115 -7
  25. package/react/hooks/useLazyQuery.js.map +1 -1
  26. package/react/hooks/useLoadableQuery.d.ts +195 -8
  27. package/react/hooks/useLoadableQuery.js.map +1 -1
  28. package/react/hooks/useMutation.d.ts +20 -9
  29. package/react/hooks/useMutation.js.map +1 -1
  30. package/react/hooks/useQuery.d.ts +280 -11
  31. package/react/hooks/useQuery.js.map +1 -1
  32. package/react/hooks/useSuspenseQuery.d.ts +405 -13
  33. package/react/hooks/useSuspenseQuery.js.map +1 -1
  34. package/react/hooks-compiled/useBackgroundQuery.d.ts +1019 -19
  35. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  36. package/react/hooks-compiled/useLazyQuery.d.ts +115 -7
  37. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  38. package/react/hooks-compiled/useLoadableQuery.d.ts +195 -8
  39. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  40. package/react/hooks-compiled/useMutation.d.ts +20 -9
  41. package/react/hooks-compiled/useMutation.js.map +1 -1
  42. package/react/hooks-compiled/useQuery.d.ts +280 -11
  43. package/react/hooks-compiled/useQuery.js.map +1 -1
  44. package/react/hooks-compiled/useSuspenseQuery.d.ts +405 -13
  45. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  46. package/react/query-preloader/createQueryPreloader.d.ts +395 -123
  47. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  48. package/version.js +1 -1
@@ -299,10 +299,6 @@ export declare namespace useSuspenseQuery {
299
299
  }
300
300
  namespace Signatures {
301
301
  /**
302
- * @deprecated Avoid manually specifying generic arguments on `useSuspenseQuery`.
303
- * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.
304
- *
305
- *
306
302
  * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
307
303
  *
308
304
  * @example
@@ -344,6 +340,402 @@ export declare namespace useSuspenseQuery {
344
340
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
345
341
  */
346
342
  interface Classic {
343
+ /**
344
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
345
+ *
346
+ * @example
347
+ *
348
+ * ```jsx
349
+ * import { Suspense } from "react";
350
+ * import { useSuspenseQuery } from "@apollo/client";
351
+ *
352
+ * const listQuery = gql`
353
+ * query {
354
+ * list {
355
+ * id
356
+ * }
357
+ * }
358
+ * `;
359
+ *
360
+ * function App() {
361
+ * return (
362
+ * <Suspense fallback={<Spinner />}>
363
+ * <List />
364
+ * </Suspense>
365
+ * );
366
+ * }
367
+ *
368
+ * function List() {
369
+ * const { data } = useSuspenseQuery(listQuery);
370
+ *
371
+ * return (
372
+ * <ol>
373
+ * {data.list.map((item) => (
374
+ * <Item key={item.id} id={item.id} />
375
+ * ))}
376
+ * </ol>
377
+ * );
378
+ * }
379
+ * ```
380
+ *
381
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
382
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
383
+ */
384
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
385
+ returnPartialData: true;
386
+ errorPolicy: "ignore" | "all";
387
+ }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "partial" | "empty">;
388
+ /**
389
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
390
+ *
391
+ * @example
392
+ *
393
+ * ```jsx
394
+ * import { Suspense } from "react";
395
+ * import { useSuspenseQuery } from "@apollo/client";
396
+ *
397
+ * const listQuery = gql`
398
+ * query {
399
+ * list {
400
+ * id
401
+ * }
402
+ * }
403
+ * `;
404
+ *
405
+ * function App() {
406
+ * return (
407
+ * <Suspense fallback={<Spinner />}>
408
+ * <List />
409
+ * </Suspense>
410
+ * );
411
+ * }
412
+ *
413
+ * function List() {
414
+ * const { data } = useSuspenseQuery(listQuery);
415
+ *
416
+ * return (
417
+ * <ol>
418
+ * {data.list.map((item) => (
419
+ * <Item key={item.id} id={item.id} />
420
+ * ))}
421
+ * </ol>
422
+ * );
423
+ * }
424
+ * ```
425
+ *
426
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
427
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
428
+ */
429
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
430
+ errorPolicy: "ignore" | "all";
431
+ }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
432
+ /**
433
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
434
+ *
435
+ * @example
436
+ *
437
+ * ```jsx
438
+ * import { Suspense } from "react";
439
+ * import { useSuspenseQuery } from "@apollo/client";
440
+ *
441
+ * const listQuery = gql`
442
+ * query {
443
+ * list {
444
+ * id
445
+ * }
446
+ * }
447
+ * `;
448
+ *
449
+ * function App() {
450
+ * return (
451
+ * <Suspense fallback={<Spinner />}>
452
+ * <List />
453
+ * </Suspense>
454
+ * );
455
+ * }
456
+ *
457
+ * function List() {
458
+ * const { data } = useSuspenseQuery(listQuery);
459
+ *
460
+ * return (
461
+ * <ol>
462
+ * {data.list.map((item) => (
463
+ * <Item key={item.id} id={item.id} />
464
+ * ))}
465
+ * </ol>
466
+ * );
467
+ * }
468
+ * ```
469
+ *
470
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
471
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
472
+ */
473
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
474
+ skip: boolean;
475
+ returnPartialData: true;
476
+ }): useSuspenseQuery.Result<TData, TVariables, "complete" | "empty" | "streaming" | "partial">;
477
+ /**
478
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
479
+ *
480
+ * @example
481
+ *
482
+ * ```jsx
483
+ * import { Suspense } from "react";
484
+ * import { useSuspenseQuery } from "@apollo/client";
485
+ *
486
+ * const listQuery = gql`
487
+ * query {
488
+ * list {
489
+ * id
490
+ * }
491
+ * }
492
+ * `;
493
+ *
494
+ * function App() {
495
+ * return (
496
+ * <Suspense fallback={<Spinner />}>
497
+ * <List />
498
+ * </Suspense>
499
+ * );
500
+ * }
501
+ *
502
+ * function List() {
503
+ * const { data } = useSuspenseQuery(listQuery);
504
+ *
505
+ * return (
506
+ * <ol>
507
+ * {data.list.map((item) => (
508
+ * <Item key={item.id} id={item.id} />
509
+ * ))}
510
+ * </ol>
511
+ * );
512
+ * }
513
+ * ```
514
+ *
515
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
516
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
517
+ */
518
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
519
+ returnPartialData: true;
520
+ }): useSuspenseQuery.Result<TData, TVariables, "partial" | "streaming" | "complete">;
521
+ /**
522
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
523
+ *
524
+ * @example
525
+ *
526
+ * ```jsx
527
+ * import { Suspense } from "react";
528
+ * import { useSuspenseQuery } from "@apollo/client";
529
+ *
530
+ * const listQuery = gql`
531
+ * query {
532
+ * list {
533
+ * id
534
+ * }
535
+ * }
536
+ * `;
537
+ *
538
+ * function App() {
539
+ * return (
540
+ * <Suspense fallback={<Spinner />}>
541
+ * <List />
542
+ * </Suspense>
543
+ * );
544
+ * }
545
+ *
546
+ * function List() {
547
+ * const { data } = useSuspenseQuery(listQuery);
548
+ *
549
+ * return (
550
+ * <ol>
551
+ * {data.list.map((item) => (
552
+ * <Item key={item.id} id={item.id} />
553
+ * ))}
554
+ * </ol>
555
+ * );
556
+ * }
557
+ * ```
558
+ *
559
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
560
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
561
+ */
562
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
563
+ skip: boolean;
564
+ }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
565
+ /**
566
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
567
+ *
568
+ * @example
569
+ *
570
+ * ```jsx
571
+ * import { Suspense } from "react";
572
+ * import { useSuspenseQuery } from "@apollo/client";
573
+ *
574
+ * const listQuery = gql`
575
+ * query {
576
+ * list {
577
+ * id
578
+ * }
579
+ * }
580
+ * `;
581
+ *
582
+ * function App() {
583
+ * return (
584
+ * <Suspense fallback={<Spinner />}>
585
+ * <List />
586
+ * </Suspense>
587
+ * );
588
+ * }
589
+ *
590
+ * function List() {
591
+ * const { data } = useSuspenseQuery(listQuery);
592
+ *
593
+ * return (
594
+ * <ol>
595
+ * {data.list.map((item) => (
596
+ * <Item key={item.id} id={item.id} />
597
+ * ))}
598
+ * </ol>
599
+ * );
600
+ * }
601
+ * ```
602
+ *
603
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
604
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
605
+ */
606
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (useSuspenseQuery.Options<NoInfer<TVariables>> & {
607
+ returnPartialData: true;
608
+ })): useSuspenseQuery.Result<TData, TVariables, "empty" | "streaming" | "complete" | "partial">;
609
+ /**
610
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
611
+ *
612
+ * @example
613
+ *
614
+ * ```jsx
615
+ * import { Suspense } from "react";
616
+ * import { useSuspenseQuery } from "@apollo/client";
617
+ *
618
+ * const listQuery = gql`
619
+ * query {
620
+ * list {
621
+ * id
622
+ * }
623
+ * }
624
+ * `;
625
+ *
626
+ * function App() {
627
+ * return (
628
+ * <Suspense fallback={<Spinner />}>
629
+ * <List />
630
+ * </Suspense>
631
+ * );
632
+ * }
633
+ *
634
+ * function List() {
635
+ * const { data } = useSuspenseQuery(listQuery);
636
+ *
637
+ * return (
638
+ * <ol>
639
+ * {data.list.map((item) => (
640
+ * <Item key={item.id} id={item.id} />
641
+ * ))}
642
+ * </ol>
643
+ * );
644
+ * }
645
+ * ```
646
+ *
647
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
648
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
649
+ */
650
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
651
+ options?: useSuspenseQuery.Options<NoInfer<TVariables>>
652
+ ] : [options: useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming">;
653
+ /**
654
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
655
+ *
656
+ * @example
657
+ *
658
+ * ```jsx
659
+ * import { Suspense } from "react";
660
+ * import { useSuspenseQuery } from "@apollo/client";
661
+ *
662
+ * const listQuery = gql`
663
+ * query {
664
+ * list {
665
+ * id
666
+ * }
667
+ * }
668
+ * `;
669
+ *
670
+ * function App() {
671
+ * return (
672
+ * <Suspense fallback={<Spinner />}>
673
+ * <List />
674
+ * </Suspense>
675
+ * );
676
+ * }
677
+ *
678
+ * function List() {
679
+ * const { data } = useSuspenseQuery(listQuery);
680
+ *
681
+ * return (
682
+ * <ol>
683
+ * {data.list.map((item) => (
684
+ * <Item key={item.id} id={item.id} />
685
+ * ))}
686
+ * </ol>
687
+ * );
688
+ * }
689
+ * ```
690
+ *
691
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
692
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
693
+ */
694
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
695
+ options?: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>
696
+ ] : [options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
697
+ /**
698
+ * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
699
+ *
700
+ * @example
701
+ *
702
+ * ```jsx
703
+ * import { Suspense } from "react";
704
+ * import { useSuspenseQuery } from "@apollo/client";
705
+ *
706
+ * const listQuery = gql`
707
+ * query {
708
+ * list {
709
+ * id
710
+ * }
711
+ * }
712
+ * `;
713
+ *
714
+ * function App() {
715
+ * return (
716
+ * <Suspense fallback={<Spinner />}>
717
+ * <List />
718
+ * </Suspense>
719
+ * );
720
+ * }
721
+ *
722
+ * function List() {
723
+ * const { data } = useSuspenseQuery(listQuery);
724
+ *
725
+ * return (
726
+ * <ol>
727
+ * {data.list.map((item) => (
728
+ * <Item key={item.id} id={item.id} />
729
+ * ))}
730
+ * </ol>
731
+ * );
732
+ * }
733
+ * ```
734
+ *
735
+ * @param query - A GraphQL query document parsed into an AST by `gql`.
736
+ * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
737
+ */
738
+ <TData, TVariables extends OperationVariables, _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred">(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
347
739
  /**
348
740
  * @deprecated Avoid manually specifying generic arguments on `useSuspenseQuery`.
349
741
  * Instead, rely on TypeScript's type inference along with a correctly typed `TypedDocumentNode` to get accurate types for your query results.
@@ -389,7 +781,7 @@ export declare namespace useSuspenseQuery {
389
781
  * @param query - A GraphQL query document parsed into an AST by `gql`.
390
782
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
391
783
  */
392
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
784
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
393
785
  returnPartialData: true;
394
786
  errorPolicy: "ignore" | "all";
395
787
  }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "partial" | "empty">;
@@ -438,7 +830,7 @@ export declare namespace useSuspenseQuery {
438
830
  * @param query - A GraphQL query document parsed into an AST by `gql`.
439
831
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
440
832
  */
441
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
833
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
442
834
  errorPolicy: "ignore" | "all";
443
835
  }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
444
836
  /**
@@ -486,7 +878,7 @@ export declare namespace useSuspenseQuery {
486
878
  * @param query - A GraphQL query document parsed into an AST by `gql`.
487
879
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
488
880
  */
489
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
881
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
490
882
  skip: boolean;
491
883
  returnPartialData: true;
492
884
  }): useSuspenseQuery.Result<TData, TVariables, "complete" | "empty" | "streaming" | "partial">;
@@ -535,7 +927,7 @@ export declare namespace useSuspenseQuery {
535
927
  * @param query - A GraphQL query document parsed into an AST by `gql`.
536
928
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
537
929
  */
538
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
930
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
539
931
  returnPartialData: true;
540
932
  }): useSuspenseQuery.Result<TData, TVariables, "partial" | "streaming" | "complete">;
541
933
  /**
@@ -583,7 +975,7 @@ export declare namespace useSuspenseQuery {
583
975
  * @param query - A GraphQL query document parsed into an AST by `gql`.
584
976
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
585
977
  */
586
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
978
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: useSuspenseQuery.Options<NoInfer<TVariables>> & {
587
979
  skip: boolean;
588
980
  }): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
589
981
  /**
@@ -631,7 +1023,7 @@ export declare namespace useSuspenseQuery {
631
1023
  * @param query - A GraphQL query document parsed into an AST by `gql`.
632
1024
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
633
1025
  */
634
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (useSuspenseQuery.Options<NoInfer<TVariables>> & {
1026
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | (useSuspenseQuery.Options<NoInfer<TVariables>> & {
635
1027
  returnPartialData: true;
636
1028
  })): useSuspenseQuery.Result<TData, TVariables, "empty" | "streaming" | "complete" | "partial">;
637
1029
  /**
@@ -679,7 +1071,7 @@ export declare namespace useSuspenseQuery {
679
1071
  * @param query - A GraphQL query document parsed into an AST by `gql`.
680
1072
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
681
1073
  */
682
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
1074
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
683
1075
  options?: useSuspenseQuery.Options<NoInfer<TVariables>>
684
1076
  ] : [options: useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming">;
685
1077
  /**
@@ -727,7 +1119,7 @@ export declare namespace useSuspenseQuery {
727
1119
  * @param query - A GraphQL query document parsed into an AST by `gql`.
728
1120
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
729
1121
  */
730
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
1122
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [
731
1123
  options?: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>
732
1124
  ] : [options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>]): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
733
1125
  /**
@@ -775,7 +1167,7 @@ export declare namespace useSuspenseQuery {
775
1167
  * @param query - A GraphQL query document parsed into an AST by `gql`.
776
1168
  * @param options - An optional object containing options for the query. Instead of passing a `useSuspenseQuery.Options` object into the hook, you can also pass a [`skipToken`](#skiptoken) to prevent the `useSuspenseQuery` hook from executing the query or suspending.
777
1169
  */
778
- <TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
1170
+ <TData, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: SkipToken | useSuspenseQuery.Options<NoInfer<TVariables>>): useSuspenseQuery.Result<TData, TVariables, "complete" | "streaming" | "empty">;
779
1171
  }
780
1172
  /**
781
1173
  * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
@@ -1 +1 @@
1
- {"version":3,"file":"createQueryPreloader.cjs","sources":["../../../../src/react/query-preloader/createQueryPreloader.ts"],"sourcesContent":["import type {\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchOn,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { PreloadedQueryRef } from \"@apollo/client/react\";\nimport {\n assertWrappedQueryRef,\n getWrappedPromise,\n InternalQueryReference,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n NoInfer,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\nimport { FinalizationRegistry } from \"@apollo/client/utilities/internal/ponyfills\";\n\nimport { wrapHook } from \"../hooks/internal/index.js\";\n\nexport type PreloadQueryFetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n>;\n\nexport type PreloadQueryOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: PreloadQueryFetchPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchOn:member} */\n refetchOn?: RefetchOn.Option;\n} & VariablesOption<TVariables>;\n\n/**\n * A function that will begin loading a query when called. It's result can be\n * read by `useReadQuery` which will suspend until the query is loaded.\n * This is useful when you want to start loading a query as early as possible\n * outside of a React component.\n *\n * @example\n *\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * const queryRef = preloadQuery(query, { variables, ...otherOptions });\n *\n * function App() {\n * return (\n * <Suspense fallback={<div>Loading</div>}>\n * <MyQuery />\n * </Suspense>\n * );\n * }\n *\n * function MyQuery() {\n * const { data } = useReadQuery(queryRef);\n *\n * // do something with `data`\n * }\n * ```\n */\nexport interface PreloadQueryFunction {\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"empty\">;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n ): PreloadedQueryRef<TData, TVariables, \"complete\" | \"streaming\" | \"partial\">;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <TData = unknown, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: PreloadQueryOptions<NoInfer<TVariables>>]\n : [options: PreloadQueryOptions<NoInfer<TVariables>>]\n ): PreloadedQueryRef<TData, TVariables, \"complete\" | \"streaming\">;\n\n /**\n * A function that returns a promise that resolves when the query has finished\n * loading. The promise resolves with the `QueryReference` itself.\n *\n * @remarks\n * This method is useful for preloading queries in data loading routers, such\n * as [React Router](https://reactrouter.com/en/main) or [TanStack Router](https://tanstack.com/router),\n * to prevent routes from transitioning until the query has finished loading.\n * `data` is not exposed on the promise to discourage using the data in\n * `loader` functions and exposing it to your route components. Instead, we\n * prefer you rely on `useReadQuery` to access the data to ensure your\n * component can rerender with cache updates. If you need to access raw query\n * data, use `client.query()` directly.\n *\n * @example\n * Here's an example using React Router's `loader` function:\n *\n * ```ts\n * import { createQueryPreloader } from \"@apollo/client\";\n *\n * const preloadQuery = createQueryPreloader(client);\n *\n * export async function loader() {\n * const queryRef = preloadQuery(GET_DOGS_QUERY);\n *\n * return preloadQuery.toPromise(queryRef);\n * }\n *\n * export function RouteComponent() {\n * const queryRef = useLoaderData();\n * const { data } = useReadQuery(queryRef);\n *\n * // ...\n * }\n * ```\n */\n toPromise<TQueryRef extends PreloadedQueryRef<any, any, any>>(\n queryRef: TQueryRef\n ): Promise<TQueryRef>;\n}\n\n/**\n * A higher order function that returns a `preloadQuery` function which\n * can be used to begin loading a query with the given `client`. This is useful\n * when you want to start loading a query as early as possible outside of a\n * React component.\n *\n * > Refer to the [Suspense - Initiating queries outside React](https://www.apollographql.com/docs/react/data/suspense#initiating-queries-outside-react) section for a more in-depth overview.\n *\n * @param client - The `ApolloClient` instance that will be used to load queries\n * from the returned `preloadQuery` function.\n * @returns The `preloadQuery` function.\n *\n * @example\n *\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * ```\n */\nexport function createQueryPreloader(\n client: ApolloClient\n): PreloadQueryFunction {\n return wrapHook(\n \"createQueryPreloader\",\n _createQueryPreloader,\n client\n )(client);\n}\n\nconst _createQueryPreloader: typeof createQueryPreloader = (client) => {\n function preloadQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n VariablesOption<TVariables> = {} as any\n ): PreloadedQueryRef<TData, TVariables> {\n const queryRef = new InternalQueryReference(\n client.watchQuery({\n ...options,\n query,\n notifyOnNetworkStatusChange: false,\n } as ApolloClient.WatchQueryOptions<any, any>),\n {\n autoDisposeTimeoutMs:\n client.defaultOptions.react?.suspense?.autoDisposeTimeoutMs,\n }\n );\n\n const wrapped = wrapQueryRef(queryRef) as unknown as PreloadedQueryRef<\n TData,\n TVariables\n >;\n softRetainWhileReferenced(wrapped, queryRef);\n return wrapped;\n }\n\n return Object.assign(preloadQuery, {\n toPromise<TQueryRef extends PreloadedQueryRef<any, any, any>>(\n queryRef: TQueryRef\n ) {\n assertWrappedQueryRef(queryRef);\n return getWrappedPromise(queryRef).then(() => queryRef);\n },\n });\n};\n\n/**\n * Soft-retains the underlying `InternalQueryReference` while the `PreloadedQueryRef`\n * is still reachable.\n * When the `PreloadedQueryRef` is garbage collected, the soft retain is\n * disposed of, but only after the initial query has finished loading.\n * Once the `InternalQueryReference` is properly retained, the check for garbage\n * collection is unregistered and the soft retain is disposed of immediately.\n */\n// this is an individual function to avoid closing over any values more than necessary\nfunction softRetainWhileReferenced(\n wrapped: PreloadedQueryRef<any, any, any>,\n queryRef: InternalQueryReference\n) {\n const { softDispose, delayedSoftDispose } = getCleanup(queryRef);\n registry.register(wrapped, delayedSoftDispose, queryRef);\n // This will unregister the cleanup from the finalization registry when\n // the queryRef is properly retained.\n // This is mostly done to keep the FinalizationRegistry from holding too many\n // cleanup functions, as our React Native polyfill has to iterate all of them regularly.\n queryRef.retain = unregisterOnRetain(queryRef.retain, softDispose);\n}\n\ntype RetainFunction = (\n this: InternalQueryReference,\n ...args: Parameters<InternalQueryReference[\"retain\"]>\n) => ReturnType<InternalQueryReference[\"retain\"]>;\n\n// this is an individual function to avoid closing over any values more than necessary\nfunction unregisterOnRetain(\n originalRetain: RetainFunction,\n softDispose: () => void\n): RetainFunction {\n return function (...args) {\n registry.unregister(this);\n const dispose = originalRetain.apply(this, args);\n softDispose();\n return dispose;\n };\n}\n\n// this is an individual function to avoid closing over any values more than necessary\nfunction getCleanup(queryRef: InternalQueryReference) {\n const softDispose = queryRef.softRetain();\n const initialPromise = queryRef.promise;\n\n return {\n softDispose,\n delayedSoftDispose: () =>\n initialPromise.finally(softDispose).catch(() => {}),\n };\n}\n\nconst registry = new FinalizationRegistry<() => void>((cleanup) => cleanup());\n"],"names":[],"mappings":";;AA4KA,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,CAA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s","sources":["../../../../src/react/query-preloader/createQueryPreloader.ts"],"sourcesContent":["import type {\n ApolloClient,\n DefaultContext,\n DocumentNode,\n ErrorPolicy,\n OperationVariables,\n RefetchOn,\n RefetchWritePolicy,\n TypedDocumentNode,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { PreloadedQueryRef } from \"@apollo/client/react\";\nimport {\n assertWrappedQueryRef,\n getWrappedPromise,\n InternalQueryReference,\n wrapQueryRef,\n} from \"@apollo/client/react/internal\";\nimport type {\n NoInfer,\n OptionWithFallback,\n SignatureStyle,\n VariablesOption,\n} from \"@apollo/client/utilities/internal\";\nimport { FinalizationRegistry } from \"@apollo/client/utilities/internal/ponyfills\";\n\nimport { wrapHook } from \"../hooks/internal/index.js\";\n\nexport type PreloadQueryFetchPolicy = Extract<\n WatchQueryFetchPolicy,\n \"cache-first\" | \"network-only\" | \"no-cache\" | \"cache-and-network\"\n>;\n\nexport type PreloadQueryOptions<\n TVariables extends OperationVariables = OperationVariables,\n> = {\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#context:member} */\n context?: DefaultContext;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#errorPolicy:member} */\n errorPolicy?: ErrorPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#fetchPolicy:member} */\n fetchPolicy?: PreloadQueryFetchPolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#returnPartialData:member} */\n returnPartialData?: boolean;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchWritePolicy:member} */\n refetchWritePolicy?: RefetchWritePolicy;\n /** {@inheritDoc @apollo/client!QueryOptionsDocumentation#refetchOn:member} */\n refetchOn?: RefetchOn.Option;\n} & VariablesOption<TVariables>;\n\n/**\n * A function that will begin loading a query when called. It's result can be\n * read by `useReadQuery` which will suspend until the query is loaded.\n * This is useful when you want to start loading a query as early as possible\n * outside of a React component.\n *\n * @example\n *\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * const queryRef = preloadQuery(query, { variables, ...otherOptions });\n *\n * function App() {\n * return (\n * <Suspense fallback={<div>Loading</div>}>\n * <MyQuery />\n * </Suspense>\n * );\n * }\n *\n * function MyQuery() {\n * const { data } = useReadQuery(queryRef);\n *\n * // do something with `data`\n * }\n * ```\n */\nexport interface PreloadQueryFunction\n extends PreloadQueryFunction.Signatures.Evaluated {\n /**\n * A function that returns a promise that resolves when the query has finished\n * loading. The promise resolves with the `QueryReference` itself.\n *\n * @remarks\n * This method is useful for preloading queries in data loading routers, such\n * as [React Router](https://reactrouter.com/en/main) or [TanStack Router](https://tanstack.com/router),\n * to prevent routes from transitioning until the query has finished loading.\n * `data` is not exposed on the promise to discourage using the data in\n * `loader` functions and exposing it to your route components. Instead, we\n * prefer you rely on `useReadQuery` to access the data to ensure your\n * component can rerender with cache updates. If you need to access raw query\n * data, use `client.query()` directly.\n *\n * @example\n * Here's an example using React Router's `loader` function:\n *\n * ```ts\n * import { createQueryPreloader } from \"@apollo/client\";\n *\n * const preloadQuery = createQueryPreloader(client);\n *\n * export async function loader() {\n * const queryRef = preloadQuery(GET_DOGS_QUERY);\n *\n * return preloadQuery.toPromise(queryRef);\n * }\n *\n * export function RouteComponent() {\n * const queryRef = useLoaderData();\n * const { data } = useReadQuery(queryRef);\n *\n * // ...\n * }\n * ```\n */\n toPromise<TQueryRef extends PreloadedQueryRef<any, any, any>>(\n queryRef: TQueryRef\n ): Promise<TQueryRef>;\n}\n\nexport declare namespace PreloadQueryFunction {\n export interface DefaultOptions\n extends ApolloClient.DefaultOptions.WatchQuery.Calculated {}\n\n export namespace DocumentationTypes {\n /**\n * @deprecated Avoid manually specifying generics on `preloadQuery`.\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!PreloadQueryFunction:interface}\n */\n export interface PreloadQueryFunction_Deprecated\n extends PreloadQueryFunction {}\n }\n\n export type ResultForOptions<\n TData,\n TVariables extends OperationVariables,\n TOptions extends Record<string, never> | PreloadQueryOptions<TVariables>,\n > = TOptions extends any ?\n PreloadedQueryRef<\n TData,\n TVariables,\n ResultForOptions.States<TOptions, DefaultOptions>\n >\n : never;\n\n export namespace ResultForOptions {\n export type States<\n TOptions,\n TDefaultOptions extends DefaultOptions = DefaultOptions,\n > =\n | \"complete\"\n | \"streaming\"\n | (OptionWithFallback<TOptions, TDefaultOptions, \"errorPolicy\"> extends (\n \"none\"\n ) ?\n never\n : \"empty\")\n | (OptionWithFallback<\n TOptions,\n TDefaultOptions,\n \"returnPartialData\"\n > extends false ?\n never\n : \"partial\");\n }\n\n export namespace Signatures {\n export interface Classic {\n // _INFERENCE_ONLY_DO_NOT_SPECIFY is used to distinguish between inferred\n // generics arguments and explicit generic arguments so that we can\n // provide a `@deprecated` signature for explicit generic arguments. As\n // soon as a user provides a generic arg (e.g. preloadQuery<TData>(query))`,\n // the overload falls through to the overloads without\n // _INFERENCE_ONLY_DO_NOT_SPECIFY.\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n _INFERENCE_ONLY_DO_NOT_SPECIFY extends \"inferred\",\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n _INFERENCE_ONLY_DO_NOT_SPECIFY extends \"inferred\",\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n _INFERENCE_ONLY_DO_NOT_SPECIFY extends \"inferred\",\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n _INFERENCE_ONLY_DO_NOT_SPECIFY extends \"inferred\",\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: PreloadQueryOptions<NoInfer<TVariables>>]\n : [options: PreloadQueryOptions<NoInfer<TVariables>>]\n ): PreloadedQueryRef<TData, TVariables, \"complete\" | \"streaming\">;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction.DocumentationTypes.PreloadQueryFunction_Deprecated:interface} */\n <TData, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\" | \"empty\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction.DocumentationTypes.PreloadQueryFunction_Deprecated:interface} */\n <TData, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n errorPolicy: \"ignore\" | \"all\";\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"empty\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction.DocumentationTypes.PreloadQueryFunction_Deprecated:interface} */\n <TData, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> & {\n returnPartialData: true;\n }\n ): PreloadedQueryRef<\n TData,\n TVariables,\n \"complete\" | \"streaming\" | \"partial\"\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction.DocumentationTypes.PreloadQueryFunction_Deprecated:interface} */\n <TData, TVariables extends OperationVariables = OperationVariables>(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n ...[options]: {} extends TVariables ?\n [options?: PreloadQueryOptions<NoInfer<TVariables>>]\n : [options: PreloadQueryOptions<NoInfer<TVariables>>]\n ): PreloadedQueryRef<TData, TVariables, \"complete\" | \"streaming\">;\n }\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n export interface Modern {\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\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 ): PreloadQueryFunction.ResultForOptions<\n TData,\n TVariables,\n Record<string, never>\n >;\n\n /** {@inheritDoc @apollo/client/react!PreloadQueryFunction:interface} */\n <\n TData,\n TVariables extends OperationVariables,\n // this overload should never be manually defined, it should always be inferred\n TOptions extends PreloadQueryOptions<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 ): PreloadQueryFunction.ResultForOptions<TData, TVariables, TOptions>;\n }\n\n export type Evaluated = SignatureStyle extends \"classic\" ? Classic : Modern;\n }\n}\n\n/**\n * A higher order function that returns a `preloadQuery` function which\n * can be used to begin loading a query with the given `client`. This is useful\n * when you want to start loading a query as early as possible outside of a\n * React component.\n *\n * > Refer to the [Suspense - Initiating queries outside React](https://www.apollographql.com/docs/react/data/suspense#initiating-queries-outside-react) section for a more in-depth overview.\n *\n * @param client - The `ApolloClient` instance that will be used to load queries\n * from the returned `preloadQuery` function.\n * @returns The `preloadQuery` function.\n *\n * @example\n *\n * ```js\n * const preloadQuery = createQueryPreloader(client);\n * ```\n */\nexport function createQueryPreloader(\n client: ApolloClient\n): PreloadQueryFunction {\n return wrapHook(\n \"createQueryPreloader\",\n _createQueryPreloader,\n client\n )(client);\n}\n\nconst _createQueryPreloader: typeof createQueryPreloader = (client) => {\n function preloadQuery<\n TData = unknown,\n TVariables extends OperationVariables = OperationVariables,\n >(\n query: DocumentNode | TypedDocumentNode<TData, TVariables>,\n options: PreloadQueryOptions<NoInfer<TVariables>> &\n VariablesOption<TVariables> = {} as any\n ): PreloadedQueryRef<TData, TVariables> {\n const queryRef = new InternalQueryReference(\n client.watchQuery({\n ...options,\n query,\n notifyOnNetworkStatusChange: false,\n } as ApolloClient.WatchQueryOptions<any, any>),\n {\n autoDisposeTimeoutMs:\n client.defaultOptions.react?.suspense?.autoDisposeTimeoutMs,\n }\n );\n\n const wrapped = wrapQueryRef(queryRef) as unknown as PreloadedQueryRef<\n TData,\n TVariables\n >;\n softRetainWhileReferenced(wrapped, queryRef);\n return wrapped;\n }\n\n return Object.assign(preloadQuery, {\n toPromise<TQueryRef extends PreloadedQueryRef<any, any, any>>(\n queryRef: TQueryRef\n ) {\n assertWrappedQueryRef(queryRef);\n return getWrappedPromise(queryRef).then(() => queryRef);\n },\n });\n};\n\n/**\n * Soft-retains the underlying `InternalQueryReference` while the `PreloadedQueryRef`\n * is still reachable.\n * When the `PreloadedQueryRef` is garbage collected, the soft retain is\n * disposed of, but only after the initial query has finished loading.\n * Once the `InternalQueryReference` is properly retained, the check for garbage\n * collection is unregistered and the soft retain is disposed of immediately.\n */\n// this is an individual function to avoid closing over any values more than necessary\nfunction softRetainWhileReferenced(\n wrapped: PreloadedQueryRef<any, any, any>,\n queryRef: InternalQueryReference\n) {\n const { softDispose, delayedSoftDispose } = getCleanup(queryRef);\n registry.register(wrapped, delayedSoftDispose, queryRef);\n // This will unregister the cleanup from the finalization registry when\n // the queryRef is properly retained.\n // This is mostly done to keep the FinalizationRegistry from holding too many\n // cleanup functions, as our React Native polyfill has to iterate all of them regularly.\n queryRef.retain = unregisterOnRetain(queryRef.retain, softDispose);\n}\n\ntype RetainFunction = (\n this: InternalQueryReference,\n ...args: Parameters<InternalQueryReference[\"retain\"]>\n) => ReturnType<InternalQueryReference[\"retain\"]>;\n\n// this is an individual function to avoid closing over any values more than necessary\nfunction unregisterOnRetain(\n originalRetain: RetainFunction,\n softDispose: () => void\n): RetainFunction {\n return function (...args) {\n registry.unregister(this);\n const dispose = originalRetain.apply(this, args);\n softDispose();\n return dispose;\n };\n}\n\n// this is an individual function to avoid closing over any values more than necessary\nfunction getCleanup(queryRef: InternalQueryReference) {\n const softDispose = queryRef.softRetain();\n const initialPromise = queryRef.promise;\n\n return {\n softDispose,\n delayedSoftDispose: () =>\n initialPromise.finally(softDispose).catch(() => {}),\n };\n}\n\nconst registry = new FinalizationRegistry<() => void>((cleanup) => cleanup());\n"],"names":[],"mappings":";;AA0VA,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;AA9UA,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,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