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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +12 -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 +1023 -23
  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 +288 -19
  14. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  15. package/__cjs/react/hooks/useSuspenseQuery.d.cts +409 -17
  16. package/__cjs/version.cjs +1 -1
  17. package/core/ApolloClient.d.ts +29 -2
  18. package/core/ApolloClient.js.map +1 -1
  19. package/package.json +1 -1
  20. package/react/hooks/useBackgroundQuery.d.ts +1023 -23
  21. package/react/hooks/useBackgroundQuery.js.map +1 -1
  22. package/react/hooks/useLazyQuery.d.ts +115 -7
  23. package/react/hooks/useLazyQuery.js.map +1 -1
  24. package/react/hooks/useLoadableQuery.d.ts +195 -8
  25. package/react/hooks/useLoadableQuery.js.map +1 -1
  26. package/react/hooks/useMutation.d.ts +20 -9
  27. package/react/hooks/useMutation.js.map +1 -1
  28. package/react/hooks/useQuery.d.ts +288 -19
  29. package/react/hooks/useQuery.js.map +1 -1
  30. package/react/hooks/useSuspenseQuery.d.ts +409 -17
  31. package/react/hooks/useSuspenseQuery.js.map +1 -1
  32. package/react/hooks-compiled/useBackgroundQuery.d.ts +1023 -23
  33. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  34. package/react/hooks-compiled/useLazyQuery.d.ts +115 -7
  35. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  36. package/react/hooks-compiled/useLoadableQuery.d.ts +195 -8
  37. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  38. package/react/hooks-compiled/useMutation.d.ts +20 -9
  39. package/react/hooks-compiled/useMutation.js.map +1 -1
  40. package/react/hooks-compiled/useQuery.d.ts +288 -19
  41. package/react/hooks-compiled/useQuery.js.map +1 -1
  42. package/react/hooks-compiled/useSuspenseQuery.d.ts +409 -17
  43. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  44. 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).
@@ -902,7 +1294,9 @@ export declare namespace useSuspenseQuery {
902
1294
  * @param query - A GraphQL query document parsed into an AST by `gql`.
903
1295
  * @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.
904
1296
  */
905
- <TData, TVariables extends OperationVariables, TOptions extends never>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, skipToken: SkipToken): useSuspenseQuery.ResultForOptions<TData, TVariables, SkipToken>;
1297
+ <TData, TVariables extends OperationVariables, TOptions extends useSuspenseQuery.Options<NoInfer<TVariables>> & VariablesOption<TVariables & {
1298
+ [K in Exclude<keyof TOptions["variables"], keyof TVariables>]?: never;
1299
+ }>>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [options?: TOptions] : [options: TOptions]): useSuspenseQuery.ResultForOptions<TData, TVariables, TOptions>;
906
1300
  /**
907
1301
  * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
908
1302
  *
@@ -944,9 +1338,7 @@ export declare namespace useSuspenseQuery {
944
1338
  * @param query - A GraphQL query document parsed into an AST by `gql`.
945
1339
  * @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.
946
1340
  */
947
- <TData, TVariables extends OperationVariables, TOptions extends useSuspenseQuery.Options<NoInfer<TVariables>> & VariablesOption<TVariables & {
948
- [K in Exclude<keyof TOptions["variables"], keyof TVariables>]?: never;
949
- }>>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, ...[options]: {} extends TVariables ? [options?: TOptions] : [options: TOptions]): useSuspenseQuery.ResultForOptions<TData, TVariables, TOptions>;
1341
+ <TData, TVariables extends OperationVariables, TOptions extends never>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, skipToken: SkipToken): useSuspenseQuery.ResultForOptions<TData, TVariables, SkipToken>;
950
1342
  /**
951
1343
  * For a detailed explanation of `useSuspenseQuery`, see the [fetching with Suspense reference](https://www.apollographql.com/docs/react/data/suspense).
952
1344
  *