@apollo/client 4.1.0-alpha.8 → 4.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/__cjs/cache/core/cache.cjs +64 -24
- package/__cjs/cache/core/cache.cjs.map +1 -1
- package/__cjs/cache/core/cache.d.cts +47 -0
- package/__cjs/cache/core/types/Cache.d.cts +38 -0
- package/__cjs/cache/inmemory/entityStore.cjs +3 -3
- package/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.cjs +47 -0
- package/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/__cjs/cache/inmemory/inMemoryCache.d.cts +47 -0
- package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/__cjs/cache/inmemory/policies.cjs +14 -5
- package/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/__cjs/cache/inmemory/policies.d.cts +5 -0
- package/__cjs/cache/inmemory/readFromStore.cjs +3 -3
- package/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/types.d.cts +1 -0
- package/__cjs/cache/inmemory/writeToStore.cjs +6 -5
- package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/__cjs/cache/inmemory/writeToStore.d.cts +2 -1
- package/__cjs/core/ApolloClient.cjs +14 -14
- package/__cjs/core/ApolloClient.cjs.map +1 -1
- package/__cjs/core/ApolloClient.d.cts +21 -1
- package/__cjs/core/ObservableQuery.cjs +22 -8
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/core/ObservableQuery.d.cts +1 -0
- package/__cjs/core/QueryInfo.cjs +3 -0
- package/__cjs/core/QueryInfo.cjs.map +1 -1
- package/__cjs/core/QueryManager.cjs +27 -17
- package/__cjs/core/QueryManager.cjs.map +1 -1
- package/__cjs/core/QueryManager.d.cts +18 -2
- package/__cjs/invariantErrorCodes.cjs +39 -33
- package/__cjs/link/error/index.cjs +1 -1
- package/__cjs/link/error/index.cjs.map +1 -1
- package/__cjs/link/error/index.d.cts +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.cjs +1 -0
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useQuery.cjs +7 -4
- package/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useSuspenseQuery.cjs +2 -0
- package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/__cjs/utilities/internal/checkDocument.cjs +2 -4
- package/__cjs/utilities/internal/checkDocument.cjs.map +1 -1
- package/__cjs/utilities/internal/constants.cjs +21 -0
- package/__cjs/utilities/internal/constants.cjs.map +1 -0
- package/__cjs/utilities/internal/constants.d.cts +18 -0
- package/__cjs/utilities/internal/index.cjs +6 -1
- package/__cjs/utilities/internal/index.cjs.map +1 -1
- package/__cjs/utilities/internal/index.d.cts +2 -0
- package/__cjs/utilities/internal/mapObservableFragment.cjs +27 -0
- package/__cjs/utilities/internal/mapObservableFragment.cjs.map +1 -0
- package/__cjs/utilities/internal/mapObservableFragment.d.cts +3 -0
- package/__cjs/utilities/internal/memoize.cjs +31 -0
- package/__cjs/utilities/internal/memoize.cjs.map +1 -0
- package/__cjs/utilities/internal/memoize.d.cts +8 -0
- package/__cjs/version.cjs +1 -1
- package/cache/core/cache.d.ts +47 -0
- package/cache/core/cache.js +65 -25
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +38 -0
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/inmemory/entityStore.js +3 -3
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +47 -0
- package/cache/inmemory/inMemoryCache.js +47 -0
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.d.ts +5 -0
- package/cache/inmemory/policies.js +14 -5
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/readFromStore.js +3 -3
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +1 -0
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +2 -1
- package/cache/inmemory/writeToStore.js +6 -5
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/core/ApolloClient.d.ts +21 -1
- package/core/ApolloClient.js +15 -15
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +1 -0
- package/core/ObservableQuery.js +23 -9
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.js +3 -0
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +18 -2
- package/core/QueryManager.js +28 -18
- package/core/QueryManager.js.map +1 -1
- package/invariantErrorCodes.js +39 -33
- package/link/error/index.d.ts +1 -1
- package/link/error/index.js +1 -1
- package/link/error/index.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +1 -1
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/useLazyQuery.js +2 -1
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useQuery.js +8 -5
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useSuspenseQuery.js +2 -0
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.js +2 -1
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useQuery.js +9 -5
- package/react/hooks-compiled/useQuery.js.map +1 -1
- package/react/hooks-compiled/useSuspenseQuery.js +3 -1
- package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/utilities/internal/checkDocument.js +2 -4
- package/utilities/internal/checkDocument.js.map +1 -1
- package/utilities/internal/constants.d.ts +18 -0
- package/utilities/internal/constants.js +18 -0
- package/utilities/internal/constants.js.map +1 -0
- package/utilities/internal/index.d.ts +2 -0
- package/utilities/internal/index.js +2 -0
- package/utilities/internal/index.js.map +1 -1
- package/utilities/internal/mapObservableFragment.d.ts +3 -0
- package/utilities/internal/mapObservableFragment.js +24 -0
- package/utilities/internal/mapObservableFragment.js.map +1 -0
- package/utilities/internal/memoize.d.ts +8 -0
- package/utilities/internal/memoize.js +28 -0
- package/utilities/internal/memoize.js.map +1 -0
- package/version.js +1 -1
package/invariantErrorCodes.js
CHANGED
|
@@ -426,110 +426,116 @@ const client = new ApolloClient({
|
|
|
426
426
|
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."
|
|
427
427
|
},
|
|
428
428
|
|
|
429
|
-
|
|
429
|
+
80: {
|
|
430
|
+
file: "@apollo/client/core/ObservableQuery.js",
|
|
431
|
+
condition: "fetchPolicy === \"standby\"",
|
|
432
|
+
message: "The `variablesUnknown` option can only be used together with a `standby` fetch policy."
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
82: {
|
|
430
436
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
431
437
|
condition: "this.options.fetchPolicy !== \"cache-only\"",
|
|
432
438
|
message: "Cannot execute `fetchMore` for 'cache-only' query '%s'. Please use a different fetch policy."
|
|
433
439
|
},
|
|
434
440
|
|
|
435
|
-
|
|
441
|
+
83: {
|
|
436
442
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
437
443
|
condition: "updateQuery",
|
|
438
444
|
message: "You must provide an `updateQuery` function when using `fetchMore` with a `no-cache` fetch policy."
|
|
439
445
|
},
|
|
440
446
|
|
|
441
|
-
|
|
447
|
+
87: {
|
|
442
448
|
file: "@apollo/client/core/QueryManager.js",
|
|
443
449
|
message: "QueryManager stopped while query was in flight"
|
|
444
450
|
},
|
|
445
451
|
|
|
446
|
-
|
|
452
|
+
88: {
|
|
447
453
|
file: "@apollo/client/core/QueryManager.js",
|
|
448
454
|
condition: "this.localState",
|
|
449
455
|
message: "Mutation '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
450
456
|
},
|
|
451
457
|
|
|
452
|
-
|
|
458
|
+
89: {
|
|
453
459
|
file: "@apollo/client/core/QueryManager.js",
|
|
454
460
|
message: "Store reset while query was in flight (not completed in link chain)"
|
|
455
461
|
},
|
|
456
462
|
|
|
457
|
-
|
|
463
|
+
92: {
|
|
458
464
|
file: "@apollo/client/core/QueryManager.js",
|
|
459
465
|
condition: "!this.getDocumentInfo(query).hasClientExports || this.localState",
|
|
460
466
|
message: "Subscription '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
461
467
|
},
|
|
462
468
|
|
|
463
|
-
|
|
469
|
+
93: {
|
|
464
470
|
file: "@apollo/client/core/QueryManager.js",
|
|
465
471
|
condition: "this.localState",
|
|
466
472
|
message: "%s '%s' contains `@client` fields but local state has not been configured."
|
|
467
473
|
},
|
|
468
474
|
|
|
469
|
-
|
|
475
|
+
94: {
|
|
470
476
|
file: "@apollo/client/core/QueryManager.js",
|
|
471
477
|
condition: "!hasIncrementalDirective",
|
|
472
478
|
message: "%s '%s' contains `@client` and `@defer` directives. These cannot be used together."
|
|
473
479
|
},
|
|
474
480
|
|
|
475
|
-
|
|
481
|
+
95: {
|
|
476
482
|
file: "@apollo/client/core/QueryManager.js",
|
|
477
483
|
condition: "this.localState",
|
|
478
484
|
message: "Query '%s' contains `@client` fields with variables provided by `@export` but local state has not been configured."
|
|
479
485
|
},
|
|
480
486
|
|
|
481
|
-
|
|
487
|
+
97: {
|
|
482
488
|
file: "@apollo/client/core/QueryManager.js",
|
|
483
489
|
condition: "this.localState",
|
|
484
490
|
message: "Query '%s' contains `@client` fields but local state has not been configured."
|
|
485
491
|
},
|
|
486
492
|
|
|
487
|
-
|
|
493
|
+
98: {
|
|
488
494
|
file: "@apollo/client/core/QueryManager.js",
|
|
489
495
|
condition: "didEmitValue",
|
|
490
496
|
message: "The link chain completed without emitting a value. This is likely unintentional and should be updated to emit a value before completing."
|
|
491
497
|
},
|
|
492
498
|
|
|
493
|
-
|
|
499
|
+
99: {
|
|
494
500
|
file: "@apollo/client/cache/inmemory/entityStore.js",
|
|
495
501
|
condition: "typeof dataId === \"string\"",
|
|
496
502
|
message: "store.merge expects a string ID"
|
|
497
503
|
},
|
|
498
504
|
|
|
499
|
-
|
|
505
|
+
102: {
|
|
500
506
|
file: "@apollo/client/cache/inmemory/key-extractor.js",
|
|
501
507
|
condition: "extracted !== void 0",
|
|
502
508
|
message: `Missing field '%s' while extracting keyFields from %s`
|
|
503
509
|
},
|
|
504
510
|
|
|
505
|
-
|
|
511
|
+
103: {
|
|
506
512
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
507
513
|
condition: "!old || old === which",
|
|
508
514
|
message: `Cannot change root %s __typename more than once`
|
|
509
515
|
},
|
|
510
516
|
|
|
511
|
-
|
|
517
|
+
106: {
|
|
512
518
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
513
519
|
message: "Cannot automatically merge arrays"
|
|
514
520
|
},
|
|
515
521
|
|
|
516
|
-
|
|
522
|
+
107: {
|
|
517
523
|
file: "@apollo/client/cache/inmemory/readFromStore.js",
|
|
518
524
|
message: `No fragment named %s`
|
|
519
525
|
},
|
|
520
526
|
|
|
521
|
-
|
|
527
|
+
108: {
|
|
522
528
|
file: "@apollo/client/cache/inmemory/readFromStore.js",
|
|
523
529
|
condition: "!isReference(value)",
|
|
524
530
|
message: `Missing selection set for object of type %s returned for query field %s`
|
|
525
531
|
},
|
|
526
532
|
|
|
527
|
-
|
|
533
|
+
109: {
|
|
528
534
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
529
535
|
message: `Could not identify object %s`
|
|
530
536
|
},
|
|
531
537
|
|
|
532
|
-
|
|
538
|
+
111: {
|
|
533
539
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
534
540
|
message: `No fragment named %s`
|
|
535
541
|
}
|
|
@@ -541,7 +547,7 @@ export const devDebug = {
|
|
|
541
547
|
message: `In client.refetchQueries, Promise.all promise rejected with error %o`
|
|
542
548
|
},
|
|
543
549
|
|
|
544
|
-
|
|
550
|
+
86: {
|
|
545
551
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
546
552
|
message: `Missing cache result fields: %o`
|
|
547
553
|
}
|
|
@@ -619,34 +625,34 @@ export const devWarn = {
|
|
|
619
625
|
"If you are using a split link, ensure each branch contains a terminating link that handles the request."
|
|
620
626
|
},
|
|
621
627
|
|
|
622
|
-
|
|
628
|
+
81: {
|
|
623
629
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
624
630
|
|
|
625
631
|
message: `Called refetch(%o) for query %o, which does not declare a $variables variable.
|
|
626
632
|
Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
627
633
|
},
|
|
628
634
|
|
|
629
|
-
|
|
635
|
+
85: {
|
|
630
636
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
631
637
|
message: "Cannot poll on 'cache-only' query '%s' and as such, polling is disabled. Please use a different fetch policy."
|
|
632
638
|
},
|
|
633
639
|
|
|
634
|
-
|
|
640
|
+
90: {
|
|
635
641
|
file: "@apollo/client/core/QueryManager.js",
|
|
636
642
|
message: `Unknown query named "%s" requested in refetchQueries options.include array`
|
|
637
643
|
},
|
|
638
644
|
|
|
639
|
-
|
|
645
|
+
91: {
|
|
640
646
|
file: "@apollo/client/core/QueryManager.js",
|
|
641
647
|
message: `Unknown anonymous query requested in refetchQueries options.include array`
|
|
642
648
|
},
|
|
643
649
|
|
|
644
|
-
|
|
650
|
+
96: {
|
|
645
651
|
file: "@apollo/client/core/QueryManager.js",
|
|
646
652
|
message: '[%s]: Fragments masked by data masking are inaccessible when using fetch policy "no-cache". Please add `@unmask` to each fragment spread to access the data.'
|
|
647
653
|
},
|
|
648
654
|
|
|
649
|
-
|
|
655
|
+
100: {
|
|
650
656
|
file: "@apollo/client/cache/inmemory/entityStore.js",
|
|
651
657
|
|
|
652
658
|
message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
|
|
@@ -654,24 +660,24 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`
|
|
|
654
660
|
"`toReference(object, true)`"
|
|
655
661
|
},
|
|
656
662
|
|
|
657
|
-
|
|
663
|
+
101: {
|
|
658
664
|
file: "@apollo/client/cache/inmemory/entityStore.js",
|
|
659
665
|
|
|
660
666
|
message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
|
|
661
667
|
"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
|
|
662
668
|
},
|
|
663
669
|
|
|
664
|
-
|
|
670
|
+
104: {
|
|
665
671
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
666
672
|
message: `Inferring subtype %s of supertype %s`
|
|
667
673
|
},
|
|
668
674
|
|
|
669
|
-
|
|
675
|
+
105: {
|
|
670
676
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
671
677
|
message: `Undefined 'from' passed to readField with arguments %s`
|
|
672
678
|
},
|
|
673
679
|
|
|
674
|
-
|
|
680
|
+
112: {
|
|
675
681
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
676
682
|
|
|
677
683
|
message: `Cache data may be lost when replacing the %s field of a %s object.
|
|
@@ -690,7 +696,7 @@ For more information about these options, please refer to the documentation:
|
|
|
690
696
|
`
|
|
691
697
|
},
|
|
692
698
|
|
|
693
|
-
|
|
699
|
+
113: {
|
|
694
700
|
file: "@apollo/client/cache/core/cache.js",
|
|
695
701
|
message: "Could not identify object passed to `from` for '%s' fragment, either because the object is non-normalized or the key fields are missing. If you are masking this object, please ensure the key fields are requested by the parent object."
|
|
696
702
|
}
|
|
@@ -707,12 +713,12 @@ export const devError = {
|
|
|
707
713
|
message: "The result of getSnapshot should be cached to avoid an infinite loop"
|
|
708
714
|
},
|
|
709
715
|
|
|
710
|
-
|
|
716
|
+
84: {
|
|
711
717
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
712
718
|
message: "Unhandled GraphQL subscription error"
|
|
713
719
|
},
|
|
714
720
|
|
|
715
|
-
|
|
721
|
+
110: {
|
|
716
722
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
717
723
|
message: `Missing field '%s' while writing result %o`
|
|
718
724
|
}
|
package/link/error/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare function onError(errorHandler: ErrorLink.ErrorHandler): ErrorLink
|
|
|
62
62
|
* @remarks
|
|
63
63
|
*
|
|
64
64
|
* This link is used after the GraphQL operation completes and execution is
|
|
65
|
-
* moving back up your [link chain](https://apollographql.com/docs/react/introduction#handling-a-response). The `errorHandler` function should
|
|
65
|
+
* moving back up your [link chain](https://apollographql.com/docs/react/api/link/introduction#handling-a-response). The `errorHandler` function should
|
|
66
66
|
* not return a value unless you want to [retry the operation](https://apollographql.com/docs/react/data/error-handling#retrying-operations).
|
|
67
67
|
*
|
|
68
68
|
* For more information on the types of errors that might be encountered, see
|
package/link/error/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export function onError(errorHandler) {
|
|
|
15
15
|
* @remarks
|
|
16
16
|
*
|
|
17
17
|
* This link is used after the GraphQL operation completes and execution is
|
|
18
|
-
* moving back up your [link chain](https://apollographql.com/docs/react/introduction#handling-a-response). The `errorHandler` function should
|
|
18
|
+
* moving back up your [link chain](https://apollographql.com/docs/react/api/link/introduction#handling-a-response). The `errorHandler` function should
|
|
19
19
|
* not return a value unless you want to [retry the operation](https://apollographql.com/docs/react/data/error-handling#retrying-operations).
|
|
20
20
|
*
|
|
21
21
|
* For more information on the types of errors that might be encountered, see
|
package/link/error/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/error/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,GACZ,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apollo/client\";\nimport {\n CombinedGraphQLErrors,\n graphQLResultHasProtocolErrors,\n PROTOCOL_ERRORS_SYMBOL,\n toErrorLike,\n} from \"@apollo/client/errors\";\nimport { ApolloLink } from \"@apollo/client/link\";\n\nexport declare namespace ErrorLink {\n // Using a different namespace name to avoid clash with\n // `ApolloLink.DocumentationTypes`\n export namespace ErrorLinkDocumentationTypes {\n /**\n * Callback that is called by `ErrorLink` when an error occurs from a\n * downstream link in link chain.\n *\n * @param options - The options object provided by `ErrorLink` to the error\n * handler when an error occurs.\n */\n export function ErrorHandler(\n options: ErrorHandlerOptions\n ): Observable<ApolloLink.Result> | void;\n }\n\n /** {@inheritDoc @apollo/client/link/error!ErrorLink.ErrorLinkDocumentationTypes.ErrorHandler:function(1)} */\n export interface ErrorHandler {\n (options: ErrorHandlerOptions): Observable<ApolloLink.Result> | void;\n }\n\n /**\n * The object provided to the `ErrorHandler` callback function.\n */\n export interface ErrorHandlerOptions {\n /**\n * The error that occurred during the operation execution. This can be a\n * `CombinedGraphQLErrors` instance (for GraphQL errors) or another error\n * type (for network errors).\n *\n * Use `CombinedGraphQLErrors.is(error)` to check if it's a GraphQL error with an `errors` array.\n */\n error: ErrorLike;\n /**\n * The raw GraphQL result from the server (if available), which may include\n * partial data alongside errors.\n */\n result?: ApolloLink.Result;\n\n /** The details of the GraphQL operation that produced an error. */\n operation: ApolloLink.Operation;\n\n /**\n * A function that calls the next link in the link chain. Calling\n * `return forward(operation)` in your `ErrorLink` callback\n * [retries the operation](../../data/error-handling#retrying-operations), returning a new observable for the\n * upstream link to subscribe to.\n */\n forward: ApolloLink.ForwardFunction;\n }\n}\n\n/**\n * @deprecated\n * Use `ErrorLink` from `@apollo/client/link/error` instead.\n */\nexport function onError(errorHandler: ErrorLink.ErrorHandler) {\n return new ErrorLink(errorHandler);\n}\n\n/**\n * Use the `ErrorLink` to perform custom logic when a [GraphQL or network error](https://apollographql.com/docs/react/data/error-handling)\n * occurs.\n *\n * @remarks\n *\n * This link is used after the GraphQL operation completes and execution is\n * moving back up your [link chain](https://apollographql.com/docs/react/introduction#handling-a-response). The `errorHandler` function should\n * not return a value unless you want to [retry the operation](https://apollographql.com/docs/react/data/error-handling#retrying-operations).\n *\n * For more information on the types of errors that might be encountered, see\n * the guide on [error handling](https://apollographql.com/docs/react/data/error-handling).\n *\n * @example\n *\n * ```ts\n * import { ErrorLink } from \"@apollo/client/link/error\";\n * import {\n * CombinedGraphQLErrors,\n * CombinedProtocolErrors,\n * } from \"@apollo/client/errors\";\n *\n * // Log any GraphQL errors, protocol errors, or network error that occurred\n * const errorLink = new ErrorLink(({ error, operation }) => {\n * if (CombinedGraphQLErrors.is(error)) {\n * error.errors.forEach(({ message, locations, path }) =>\n * console.log(\n * `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`\n * )\n * );\n * } else if (CombinedProtocolErrors.is(error)) {\n * error.errors.forEach(({ message, extensions }) =>\n * console.log(\n * `[Protocol error]: Message: ${message}, Extensions: ${JSON.stringify(\n * extensions\n * )}`\n * )\n * );\n * } else {\n * console.error(`[Network error]: ${error}`);\n * }\n * });\n * ```\n */\nexport class ErrorLink extends ApolloLink {\n constructor(errorHandler: ErrorLink.ErrorHandler) {\n super((operation, forward) => {\n return new Observable((observer) => {\n let sub: Subscription | undefined;\n let retriedSub: Subscription | undefined;\n let retriedResult: ReturnType<ErrorLink.ErrorHandler>;\n\n try {\n sub = forward(operation).subscribe({\n next: (result) => {\n const handler =\n operation.client[\"queryManager\"].incrementalHandler;\n const errors =\n handler.isIncrementalResult(result) ?\n handler.extractErrors(result)\n : result.errors;\n if (errors) {\n retriedResult = errorHandler({\n error: new CombinedGraphQLErrors(result, errors),\n result,\n operation,\n forward,\n });\n } else if (graphQLResultHasProtocolErrors(result)) {\n retriedResult = errorHandler({\n error: result.extensions[PROTOCOL_ERRORS_SYMBOL],\n result,\n operation,\n forward,\n });\n }\n\n retriedSub = retriedResult?.subscribe(observer);\n\n if (!retriedSub) {\n observer.next(result);\n }\n },\n error: (error) => {\n retriedResult = errorHandler({\n operation,\n error: toErrorLike(error),\n forward,\n });\n retriedSub = retriedResult?.subscribe(observer);\n\n if (!retriedSub) {\n observer.error(error);\n }\n },\n complete: () => {\n // disable the previous sub from calling complete on observable\n // if retry is in flight.\n if (!retriedResult) {\n observer.complete();\n }\n },\n });\n } catch (e) {\n errorHandler({ error: toErrorLike(e), operation, forward });\n observer.error(e);\n }\n\n return () => {\n if (sub) sub.unsubscribe();\n if (retriedSub) retriedSub.unsubscribe();\n };\n });\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/error/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAsDjD;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,YAAoC;IAC1D,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IACvC,YAAY,YAAoC;QAC9C,KAAK,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE;YAC3B,OAAO,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACjC,IAAI,GAA6B,CAAC;gBAClC,IAAI,UAAoC,CAAC;gBACzC,IAAI,aAAiD,CAAC;gBAEtD,IAAI,CAAC;oBACH,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC;wBACjC,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE;4BACf,MAAM,OAAO,GACX,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,kBAAk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CAAC;wBACH,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,YAAY,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;oBAC5D,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC;gBAED,OAAO,GAAG,EAAE;oBACV,IAAI,GAAG;wBAAE,GAAG,CAAC,WAAW,EAAE,CAAC;oBAC3B,IAAI,UAAU;wBAAE,UAAU,CAAC,WAAW,EAAE,CAAC;gBAC3C,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { Subscription } from \"rxjs\";\nimport { Observable } from \"rxjs\";\n\nimport type { ErrorLike } from \"@apollo/client\";\nimport {\n CombinedGraphQLErrors,\n graphQLResultHasProtocolErrors,\n PROTOCOL_ERRORS_SYMBOL,\n toErrorLike,\n} from \"@apollo/client/errors\";\nimport { ApolloLink } from \"@apollo/client/link\";\n\nexport declare namespace ErrorLink {\n // Using a different namespace name to avoid clash with\n // `ApolloLink.DocumentationTypes`\n export namespace ErrorLinkDocumentationTypes {\n /**\n * Callback that is called by `ErrorLink` when an error occurs from a\n * downstream link in link chain.\n *\n * @param options - The options object provided by `ErrorLink` to the error\n * handler when an error occurs.\n */\n export function ErrorHandler(\n options: ErrorHandlerOptions\n ): Observable<ApolloLink.Result> | void;\n }\n\n /** {@inheritDoc @apollo/client/link/error!ErrorLink.ErrorLinkDocumentationTypes.ErrorHandler:function(1)} */\n export interface ErrorHandler {\n (options: ErrorHandlerOptions): Observable<ApolloLink.Result> | void;\n }\n\n /**\n * The object provided to the `ErrorHandler` callback function.\n */\n export interface ErrorHandlerOptions {\n /**\n * The error that occurred during the operation execution. This can be a\n * `CombinedGraphQLErrors` instance (for GraphQL errors) or another error\n * type (for network errors).\n *\n * Use `CombinedGraphQLErrors.is(error)` to check if it's a GraphQL error with an `errors` array.\n */\n error: ErrorLike;\n /**\n * The raw GraphQL result from the server (if available), which may include\n * partial data alongside errors.\n */\n result?: ApolloLink.Result;\n\n /** The details of the GraphQL operation that produced an error. */\n operation: ApolloLink.Operation;\n\n /**\n * A function that calls the next link in the link chain. Calling\n * `return forward(operation)` in your `ErrorLink` callback\n * [retries the operation](../../data/error-handling#retrying-operations), returning a new observable for the\n * upstream link to subscribe to.\n */\n forward: ApolloLink.ForwardFunction;\n }\n}\n\n/**\n * @deprecated\n * Use `ErrorLink` from `@apollo/client/link/error` instead.\n */\nexport function onError(errorHandler: ErrorLink.ErrorHandler) {\n return new ErrorLink(errorHandler);\n}\n\n/**\n * Use the `ErrorLink` to perform custom logic when a [GraphQL or network error](https://apollographql.com/docs/react/data/error-handling)\n * occurs.\n *\n * @remarks\n *\n * This link is used after the GraphQL operation completes and execution is\n * moving back up your [link chain](https://apollographql.com/docs/react/api/link/introduction#handling-a-response). The `errorHandler` function should\n * not return a value unless you want to [retry the operation](https://apollographql.com/docs/react/data/error-handling#retrying-operations).\n *\n * For more information on the types of errors that might be encountered, see\n * the guide on [error handling](https://apollographql.com/docs/react/data/error-handling).\n *\n * @example\n *\n * ```ts\n * import { ErrorLink } from \"@apollo/client/link/error\";\n * import {\n * CombinedGraphQLErrors,\n * CombinedProtocolErrors,\n * } from \"@apollo/client/errors\";\n *\n * // Log any GraphQL errors, protocol errors, or network error that occurred\n * const errorLink = new ErrorLink(({ error, operation }) => {\n * if (CombinedGraphQLErrors.is(error)) {\n * error.errors.forEach(({ message, locations, path }) =>\n * console.log(\n * `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`\n * )\n * );\n * } else if (CombinedProtocolErrors.is(error)) {\n * error.errors.forEach(({ message, extensions }) =>\n * console.log(\n * `[Protocol error]: Message: ${message}, Extensions: ${JSON.stringify(\n * extensions\n * )}`\n * )\n * );\n * } else {\n * console.error(`[Network error]: ${error}`);\n * }\n * });\n * ```\n */\nexport class ErrorLink extends ApolloLink {\n constructor(errorHandler: ErrorLink.ErrorHandler) {\n super((operation, forward) => {\n return new Observable((observer) => {\n let sub: Subscription | undefined;\n let retriedSub: Subscription | undefined;\n let retriedResult: ReturnType<ErrorLink.ErrorHandler>;\n\n try {\n sub = forward(operation).subscribe({\n next: (result) => {\n const handler =\n operation.client[\"queryManager\"].incrementalHandler;\n const errors =\n handler.isIncrementalResult(result) ?\n handler.extractErrors(result)\n : result.errors;\n if (errors) {\n retriedResult = errorHandler({\n error: new CombinedGraphQLErrors(result, errors),\n result,\n operation,\n forward,\n });\n } else if (graphQLResultHasProtocolErrors(result)) {\n retriedResult = errorHandler({\n error: result.extensions[PROTOCOL_ERRORS_SYMBOL],\n result,\n operation,\n forward,\n });\n }\n\n retriedSub = retriedResult?.subscribe(observer);\n\n if (!retriedSub) {\n observer.next(result);\n }\n },\n error: (error) => {\n retriedResult = errorHandler({\n operation,\n error: toErrorLike(error),\n forward,\n });\n retriedSub = retriedResult?.subscribe(observer);\n\n if (!retriedSub) {\n observer.error(error);\n }\n },\n complete: () => {\n // disable the previous sub from calling complete on observable\n // if retry is in flight.\n if (!retriedResult) {\n observer.complete();\n }\n },\n });\n } catch (e) {\n errorHandler({ error: toErrorLike(e), operation, forward });\n observer.error(e);\n }\n\n return () => {\n if (sub) sub.unsubscribe();\n if (retriedSub) retriedSub.unsubscribe();\n };\n });\n });\n }\n}\n"]}
|
|
@@ -31,7 +31,7 @@ async function* consumeMultipartBody(response) {
|
|
|
31
31
|
(?:;|$) # match a semicolon or end of string
|
|
32
32
|
*/
|
|
33
33
|
/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i);
|
|
34
|
-
const boundary = "\r\n--" + (match
|
|
34
|
+
const boundary = "\r\n--" + (match ? match[1] ?? match[2] ?? match[3] ?? "-" : "-");
|
|
35
35
|
let buffer = "";
|
|
36
36
|
invariant(response.body && typeof response.body.getReader === "function", 62);
|
|
37
37
|
const stream = response.body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseAndCheckHttpResponse.js","sources":["../../../src/link/http/parseAndCheckHttpResponse.ts"],"sourcesContent":["import {\n CombinedProtocolErrors,\n PROTOCOL_ERRORS_SYMBOL,\n ServerError,\n ServerParseError,\n} from \"@apollo/client/errors\";\nimport type { ApolloLink, ApolloPayloadResult } from \"@apollo/client/link\";\nimport { isNonNullObject } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nconst { hasOwnProperty } = Object.prototype;\n\n/**\n * This function detects an Apollo payload result before it is transformed\n * into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n * once it leaves the link chain.\n */\nfunction isApolloPayloadResult(value: unknown): value is ApolloPayloadResult {\n return isNonNullObject(value) && \"payload\" in value;\n}\n\nasync function* consumeMultipartBody(\n response: Response\n): AsyncGenerator<string, void, void> {\n const decoder = new TextDecoder(\"utf-8\");\n const contentType = response.headers?.get(\"content-type\");\n\n // parse boundary value and ignore any subsequent name/value pairs after ;\n // https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters\n // e.g. multipart/mixed;boundary=\"graphql\";deferSpec=20220824\n // if no boundary is specified, default to -\n const match = contentType?.match(\n /*\n ;\\s*boundary= # Match the boundary parameter\n (?: # either\n '([^']*)' # a string starting with ' doesn't contain ', ends with '\n | # or\n \"([^\"]*)\" # a string starting with \" doesn't contain \", ends with \"\n | # or\n ([^\"'].*?) # a string that doesn't start with ' or \", parsed non-greedily\n ) # end of the group\n \\s* # optional whitespace\n (?:;|$) # match a semicolon or end of string\n */\n /;\\s*boundary=(?:'([^']+)'|\"([^\"]+)\"|([^\"'].+?))\\s*(?:;|$)/i\n );\n const boundary = \"\\r\\n--\" + (match?.findLast((val) => !!val) || \"-\");\n let buffer = \"\";\n invariant(\n response.body && typeof response.body.getReader === \"function\",\n \"Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`.\"\n );\n\n const stream = response.body;\n const reader = stream.getReader();\n let done = false;\n let encounteredBoundary = false;\n let value: Uint8Array<ArrayBufferLike> | string | undefined;\n\n // check to see if we received the final boundary, which is a normal boundary followed by \"--\"\n // as described in https://www.rfc-editor.org/rfc/rfc2046#section-5.1.1\n const passedFinalBoundary = () =>\n encounteredBoundary && buffer[0] == \"-\" && buffer[1] == \"-\";\n\n try {\n while (!done) {\n ({ value, done } = await reader.read());\n const chunk = typeof value === \"string\" ? value : decoder.decode(value);\n const searchFrom = buffer.length - boundary.length + 1;\n buffer += chunk;\n let bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1 && !passedFinalBoundary()) {\n encounteredBoundary = true;\n let message: string;\n [message, buffer] = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ];\n const i = message.indexOf(\"\\r\\n\\r\\n\");\n const headers = parseHeaders(message.slice(0, i));\n const contentType = headers[\"content-type\"];\n if (\n contentType &&\n contentType.toLowerCase().indexOf(\"application/json\") === -1\n ) {\n throw new Error(\n \"Unsupported patch content type: application/json is required.\"\n );\n }\n // nb: Technically you'd want to slice off the beginning \"\\r\\n\" but since\n // this is going to be `JSON.parse`d there is no need.\n const body = message.slice(i);\n\n if (body) {\n yield body;\n }\n bi = buffer.indexOf(boundary);\n }\n if (passedFinalBoundary()) {\n return;\n }\n }\n throw new Error(\"premature end of multipart body\");\n } finally {\n reader.cancel();\n }\n}\n\nexport async function readMultipartBody<\n T extends object = Record<string, unknown>,\n>(response: Response, nextValue: (value: T) => void) {\n for await (const body of consumeMultipartBody(response)) {\n const result = parseJsonEncoding(response, body);\n if (Object.keys(result).length == 0) continue;\n if (isApolloPayloadResult(result)) {\n if (Object.keys(result).length === 1 && result.payload === null) {\n return;\n }\n let next = { ...result.payload };\n if (\"errors\" in result) {\n next.extensions = {\n ...next.extensions,\n [PROTOCOL_ERRORS_SYMBOL]: new CombinedProtocolErrors(\n result.errors ?? []\n ),\n };\n }\n nextValue(next as T);\n } else {\n nextValue(result);\n }\n }\n}\n\nfunction parseHeaders(headerText: string): Record<string, string> {\n const headersInit: Record<string, string> = {};\n headerText.split(\"\\n\").forEach((line) => {\n const i = line.indexOf(\":\");\n if (i > -1) {\n // normalize headers to lowercase\n const name = line.slice(0, i).trim().toLowerCase();\n const value = line.slice(i + 1).trim();\n headersInit[name] = value;\n }\n });\n return headersInit;\n}\n\nfunction parseJsonEncoding(response: Response, bodyText: string) {\n if (response.status >= 300) {\n throw new ServerError(\n `Response not successful: Received status code ${response.status}`,\n { response, bodyText }\n );\n }\n\n try {\n return JSON.parse(bodyText);\n } catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\n\nfunction parseGraphQLResponseJsonEncoding(\n response: Response,\n bodyText: string\n) {\n try {\n return JSON.parse(bodyText);\n } catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\n\nfunction parseResponse(response: Response, bodyText: string) {\n const contentType = response.headers.get(\"content-type\");\n\n if (contentType?.includes(\"application/graphql-response+json\")) {\n return parseGraphQLResponseJsonEncoding(response, bodyText);\n }\n\n return parseJsonEncoding(response, bodyText);\n}\n\nexport function parseAndCheckHttpResponse(\n operations: ApolloLink.Operation | ApolloLink.Operation[]\n) {\n return (response: Response) =>\n response.text().then((bodyText) => {\n const result = parseResponse(response, bodyText);\n\n if (\n !Array.isArray(result) &&\n !hasOwnProperty.call(result, \"data\") &&\n !hasOwnProperty.call(result, \"errors\")\n ) {\n throw new ServerError(\n `Server response was malformed for query '${\n Array.isArray(operations) ?\n operations.map((op) => op.operationName)\n : operations.operationName\n }'.`,\n { response, bodyText }\n );\n }\n return result;\n });\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,EACL,CADF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACwB,EACtB,CAFF,CAA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B,EAAE,CAFtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAEgC,CACvB;QACH;QACA,CAAN,CAAA,CAAA,CAAA,CAAA,EAAa,CAAb,CAAA,CAAA,CAAA,CAAA,CAAmB;IACf,CAAC,CAAC;AACN;"}
|
|
1
|
+
{"version":3,"file":"parseAndCheckHttpResponse.js","sources":["../../../src/link/http/parseAndCheckHttpResponse.ts"],"sourcesContent":["import {\n CombinedProtocolErrors,\n PROTOCOL_ERRORS_SYMBOL,\n ServerError,\n ServerParseError,\n} from \"@apollo/client/errors\";\nimport type { ApolloLink, ApolloPayloadResult } from \"@apollo/client/link\";\nimport { isNonNullObject } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n\nconst { hasOwnProperty } = Object.prototype;\n\n/**\n * This function detects an Apollo payload result before it is transformed\n * into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n * once it leaves the link chain.\n */\nfunction isApolloPayloadResult(value: unknown): value is ApolloPayloadResult {\n return isNonNullObject(value) && \"payload\" in value;\n}\n\nasync function* consumeMultipartBody(\n response: Response\n): AsyncGenerator<string, void, void> {\n const decoder = new TextDecoder(\"utf-8\");\n const contentType = response.headers?.get(\"content-type\");\n\n // parse boundary value and ignore any subsequent name/value pairs after ;\n // https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters\n // e.g. multipart/mixed;boundary=\"graphql\";deferSpec=20220824\n // if no boundary is specified, default to -\n const match = contentType?.match(\n /*\n ;\\s*boundary= # Match the boundary parameter\n (?: # either\n '([^']*)' # a string starting with ' doesn't contain ', ends with '\n | # or\n \"([^\"]*)\" # a string starting with \" doesn't contain \", ends with \"\n | # or\n ([^\"'].*?) # a string that doesn't start with ' or \", parsed non-greedily\n ) # end of the group\n \\s* # optional whitespace\n (?:;|$) # match a semicolon or end of string\n */\n /;\\s*boundary=(?:'([^']+)'|\"([^\"]+)\"|([^\"'].+?))\\s*(?:;|$)/i\n );\n const boundary =\n \"\\r\\n--\" + (match ? match[1] ?? match[2] ?? match[3] ?? \"-\" : \"-\");\n let buffer = \"\";\n invariant(\n response.body && typeof response.body.getReader === \"function\",\n \"Unknown type for `response.body`. Please use a `fetch` implementation that is WhatWG-compliant and that uses WhatWG ReadableStreams for `body`.\"\n );\n\n const stream = response.body;\n const reader = stream.getReader();\n let done = false;\n let encounteredBoundary = false;\n let value: Uint8Array<ArrayBufferLike> | string | undefined;\n\n // check to see if we received the final boundary, which is a normal boundary followed by \"--\"\n // as described in https://www.rfc-editor.org/rfc/rfc2046#section-5.1.1\n const passedFinalBoundary = () =>\n encounteredBoundary && buffer[0] == \"-\" && buffer[1] == \"-\";\n\n try {\n while (!done) {\n ({ value, done } = await reader.read());\n const chunk = typeof value === \"string\" ? value : decoder.decode(value);\n const searchFrom = buffer.length - boundary.length + 1;\n buffer += chunk;\n let bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1 && !passedFinalBoundary()) {\n encounteredBoundary = true;\n let message: string;\n [message, buffer] = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ];\n const i = message.indexOf(\"\\r\\n\\r\\n\");\n const headers = parseHeaders(message.slice(0, i));\n const contentType = headers[\"content-type\"];\n if (\n contentType &&\n contentType.toLowerCase().indexOf(\"application/json\") === -1\n ) {\n throw new Error(\n \"Unsupported patch content type: application/json is required.\"\n );\n }\n // nb: Technically you'd want to slice off the beginning \"\\r\\n\" but since\n // this is going to be `JSON.parse`d there is no need.\n const body = message.slice(i);\n\n if (body) {\n yield body;\n }\n bi = buffer.indexOf(boundary);\n }\n if (passedFinalBoundary()) {\n return;\n }\n }\n throw new Error(\"premature end of multipart body\");\n } finally {\n reader.cancel();\n }\n}\n\nexport async function readMultipartBody<\n T extends object = Record<string, unknown>,\n>(response: Response, nextValue: (value: T) => void) {\n for await (const body of consumeMultipartBody(response)) {\n const result = parseJsonEncoding(response, body);\n if (Object.keys(result).length == 0) continue;\n if (isApolloPayloadResult(result)) {\n if (Object.keys(result).length === 1 && result.payload === null) {\n return;\n }\n let next = { ...result.payload };\n if (\"errors\" in result) {\n next.extensions = {\n ...next.extensions,\n [PROTOCOL_ERRORS_SYMBOL]: new CombinedProtocolErrors(\n result.errors ?? []\n ),\n };\n }\n nextValue(next as T);\n } else {\n nextValue(result);\n }\n }\n}\n\nfunction parseHeaders(headerText: string): Record<string, string> {\n const headersInit: Record<string, string> = {};\n headerText.split(\"\\n\").forEach((line) => {\n const i = line.indexOf(\":\");\n if (i > -1) {\n // normalize headers to lowercase\n const name = line.slice(0, i).trim().toLowerCase();\n const value = line.slice(i + 1).trim();\n headersInit[name] = value;\n }\n });\n return headersInit;\n}\n\nfunction parseJsonEncoding(response: Response, bodyText: string) {\n if (response.status >= 300) {\n throw new ServerError(\n `Response not successful: Received status code ${response.status}`,\n { response, bodyText }\n );\n }\n\n try {\n return JSON.parse(bodyText);\n } catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\n\nfunction parseGraphQLResponseJsonEncoding(\n response: Response,\n bodyText: string\n) {\n try {\n return JSON.parse(bodyText);\n } catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\n\nfunction parseResponse(response: Response, bodyText: string) {\n const contentType = response.headers.get(\"content-type\");\n\n if (contentType?.includes(\"application/graphql-response+json\")) {\n return parseGraphQLResponseJsonEncoding(response, bodyText);\n }\n\n return parseJsonEncoding(response, bodyText);\n}\n\nexport function parseAndCheckHttpResponse(\n operations: ApolloLink.Operation | ApolloLink.Operation[]\n) {\n return (response: Response) =>\n response.text().then((bodyText) => {\n const result = parseResponse(response, bodyText);\n\n if (\n !Array.isArray(result) &&\n !hasOwnProperty.call(result, \"data\") &&\n !hasOwnProperty.call(result, \"errors\")\n ) {\n throw new ServerError(\n `Server response was malformed for query '${\n Array.isArray(operations) ?\n operations.map((op) => op.operationName)\n : operations.operationName\n }'.`,\n { response, bodyText }\n );\n }\n return result;\n });\n}\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,CAAA,C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A,CAAA,CAAA,CAAA,CAAA,CAAwB,CAAC,CAAzB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACU,CADV,CAAA,CAAA,CACc,EACJ,EAAE,CAFZ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAEoB,EAAE,CAFtB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAEgC,CACvB;QACH;QACA,CAAN,CAAA,CAAA,CAAA,CAAA,EAAa,CAAb,CAAA,CAAA,CAAA,CAAA,CAAmB;IACf,CAAC,CAAC;AACN;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { equal } from "@wry/equality";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { NetworkStatus } from "@apollo/client";
|
|
4
|
-
import { maybeDeepFreeze } from "@apollo/client/utilities/internal";
|
|
4
|
+
import { maybeDeepFreeze, variablesUnknownSymbol, } from "@apollo/client/utilities/internal";
|
|
5
5
|
import { invariant } from "@apollo/client/utilities/invariant";
|
|
6
6
|
import { useRenderGuard } from "./internal/index.js";
|
|
7
7
|
import { useDeepMemo } from "./internal/useDeepMemo.js";
|
|
@@ -30,6 +30,7 @@ export function useLazyQuery(query, options) {
|
|
|
30
30
|
query,
|
|
31
31
|
initialFetchPolicy: options?.fetchPolicy,
|
|
32
32
|
fetchPolicy: "standby",
|
|
33
|
+
[variablesUnknownSymbol]: true,
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
const [currentClient, setCurrentClient] = React.useState(client);
|