@apollo/client 3.5.0 → 3.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/apollo-client.cjs +72 -53
  3. package/apollo-client.cjs.map +1 -1
  4. package/apollo-client.min.cjs +1 -1
  5. package/cache/core/cache.js +2 -2
  6. package/cache/inmemory/entityStore.js +4 -4
  7. package/cache/inmemory/inMemoryCache.js +3 -3
  8. package/cache/inmemory/object-canon.js +2 -2
  9. package/cache/inmemory/policies.js +1 -1
  10. package/cache/inmemory/reactiveVars.js +2 -2
  11. package/cache/inmemory/readFromStore.js +2 -2
  12. package/cache/inmemory/writeToStore.js +3 -3
  13. package/config/jest/setup.js +1 -1
  14. package/core/ApolloClient.d.ts +0 -1
  15. package/core/ApolloClient.d.ts.map +1 -1
  16. package/core/ApolloClient.js +1 -1
  17. package/core/LocalState.js +2 -2
  18. package/core/ObservableQuery.d.ts +0 -1
  19. package/core/ObservableQuery.d.ts.map +1 -1
  20. package/core/ObservableQuery.js +2 -2
  21. package/core/QueryInfo.d.ts +2 -2
  22. package/core/QueryInfo.d.ts.map +1 -1
  23. package/core/QueryInfo.js +2 -2
  24. package/core/QueryManager.d.ts +0 -1
  25. package/core/QueryManager.d.ts.map +1 -1
  26. package/core/QueryManager.js +2 -2
  27. package/core/core.cjs +1 -1
  28. package/core/core.cjs.map +1 -1
  29. package/core/index.js +2 -2
  30. package/errors/index.js +1 -1
  31. package/invariantErrorCodes.js +1 -1
  32. package/link/batch/batchLink.d.ts +0 -1
  33. package/link/batch/batchLink.d.ts.map +1 -1
  34. package/link/batch/batchLink.js +1 -1
  35. package/link/batch/batching.d.ts +0 -1
  36. package/link/batch/batching.d.ts.map +1 -1
  37. package/link/batch/batching.js +1 -1
  38. package/link/batch-http/batchHttpLink.d.ts +0 -1
  39. package/link/batch-http/batchHttpLink.d.ts.map +1 -1
  40. package/link/batch-http/batchHttpLink.js +1 -1
  41. package/link/context/index.js +1 -1
  42. package/link/core/ApolloLink.d.ts +0 -1
  43. package/link/core/ApolloLink.d.ts.map +1 -1
  44. package/link/core/ApolloLink.js +1 -1
  45. package/link/core/types.d.ts +0 -1
  46. package/link/core/types.d.ts.map +1 -1
  47. package/link/error/index.d.ts +0 -1
  48. package/link/error/index.d.ts.map +1 -1
  49. package/link/error/index.js +1 -1
  50. package/link/http/HttpLink.js +1 -1
  51. package/link/http/createHttpLink.js +2 -2
  52. package/link/http/selectHttpOptionsAndBody.js +2 -2
  53. package/link/persisted-queries/index.js +2 -2
  54. package/link/retry/retryLink.d.ts +0 -1
  55. package/link/retry/retryLink.d.ts.map +1 -1
  56. package/link/retry/retryLink.js +1 -1
  57. package/link/schema/index.d.ts +0 -1
  58. package/link/schema/index.d.ts.map +1 -1
  59. package/link/schema/index.js +2 -2
  60. package/link/utils/createOperation.js +1 -1
  61. package/link/utils/fromError.d.ts +0 -1
  62. package/link/utils/fromError.d.ts.map +1 -1
  63. package/link/utils/fromPromise.d.ts +0 -1
  64. package/link/utils/fromPromise.d.ts.map +1 -1
  65. package/link/utils/toPromise.d.ts +0 -1
  66. package/link/utils/toPromise.d.ts.map +1 -1
  67. package/link/ws/index.d.ts +0 -1
  68. package/link/ws/index.d.ts.map +1 -1
  69. package/link/ws/index.js +2 -2
  70. package/package.json +5 -6
  71. package/react/components/Mutation.js +1 -1
  72. package/react/components/Query.js +2 -2
  73. package/react/components/Subscription.js +1 -1
  74. package/react/context/ApolloConsumer.js +1 -1
  75. package/react/context/ApolloContext.js +1 -1
  76. package/react/context/ApolloProvider.js +1 -1
  77. package/react/hoc/hoc-utils.js +2 -2
  78. package/react/hoc/mutation-hoc.js +3 -3
  79. package/react/hoc/query-hoc.js +3 -3
  80. package/react/hoc/subscription-hoc.js +3 -3
  81. package/react/hoc/withApollo.js +3 -3
  82. package/react/hooks/hooks.cjs +70 -51
  83. package/react/hooks/hooks.cjs.map +1 -1
  84. package/react/hooks/useApolloClient.js +1 -1
  85. package/react/hooks/useLazyQuery.js +2 -2
  86. package/react/hooks/useMutation.d.ts.map +1 -1
  87. package/react/hooks/useMutation.js +73 -54
  88. package/react/hooks/useMutation.js.map +1 -1
  89. package/react/hooks/useQuery.js +3 -3
  90. package/react/hooks/useReactiveVar.js +1 -1
  91. package/react/hooks/useSubscription.js +2 -2
  92. package/react/ssr/getDataFromTree.js +2 -2
  93. package/react/types/types.d.ts +0 -1
  94. package/react/types/types.d.ts.map +1 -1
  95. package/testing/core/mocking/mockFetch.js +2 -2
  96. package/testing/core/mocking/mockLink.d.ts +0 -1
  97. package/testing/core/mocking/mockLink.d.ts.map +1 -1
  98. package/testing/core/mocking/mockLink.js +3 -3
  99. package/testing/core/mocking/mockSubscriptionLink.d.ts +0 -1
  100. package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
  101. package/testing/core/mocking/mockSubscriptionLink.js +1 -1
  102. package/testing/core/mocking/mockWatchQuery.js +1 -1
  103. package/testing/core/observableToPromise.js +1 -1
  104. package/testing/react/MockedProvider.js +2 -2
  105. package/utilities/common/mergeDeep.js +1 -1
  106. package/utilities/globals/fix-graphql.js +1 -1
  107. package/utilities/globals/index.js +1 -1
  108. package/utilities/graphql/directives.js +1 -1
  109. package/utilities/graphql/fragments.d.ts.map +1 -1
  110. package/utilities/graphql/fragments.js +1 -1
  111. package/utilities/graphql/fragments.js.map +1 -1
  112. package/utilities/graphql/transform.js +2 -2
  113. package/utilities/observables/Concast.d.ts +0 -1
  114. package/utilities/observables/Concast.d.ts.map +1 -1
  115. package/utilities/observables/Concast.js +1 -1
  116. package/utilities/observables/Observable.js +2 -2
  117. package/utilities/observables/asyncMap.d.ts +0 -1
  118. package/utilities/observables/asyncMap.d.ts.map +1 -1
  119. package/utilities/observables/subclassing.d.ts +0 -1
  120. package/utilities/observables/subclassing.d.ts.map +1 -1
  121. package/utilities/policies/pagination.js +2 -2
  122. package/version.js +1 -1
package/core/index.js CHANGED
@@ -10,8 +10,8 @@ export * from "../link/core/index.js";
10
10
  export * from "../link/http/index.js";
11
11
  export { fromError, toPromise, fromPromise, throwServerError, } from "../link/utils/index.js";
12
12
  export { Observable, isReference, makeReference, } from "../utilities/index.js";
13
- import { setVerbosity } from "ts-invariant/lib/invariant.esm.js";
13
+ import { setVerbosity } from "ts-invariant";
14
14
  export { setVerbosity as setLogVerbosity };
15
15
  setVerbosity(DEV ? "log" : "silent");
16
- export { gql, resetCaches, disableFragmentWarnings, enableExperimentalFragmentVariables, disableExperimentalFragmentVariables, } from "graphql-tag/lib/index.js";
16
+ export { gql, resetCaches, disableFragmentWarnings, enableExperimentalFragmentVariables, disableExperimentalFragmentVariables, } from 'graphql-tag';
17
17
  //# sourceMappingURL=index.js.map
package/errors/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import "../utilities/globals/index.js";
3
3
  import { isNonEmptyArray } from "../utilities/index.js";
4
4
  export function isApolloError(err) {
@@ -5,7 +5,7 @@
5
5
  // consult the @apollo/client/invariantErrorCodes.js file specific to
6
6
  // your @apollo/client version. This file is not meant to be imported.
7
7
  {
8
- "@apollo/client version": "3.5.0",
8
+ "@apollo/client version": "3.5.4",
9
9
 
10
10
  1: {
11
11
  file: "@apollo/client/cache/inmemory/entityStore.js",
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { ApolloLink, Operation, FetchResult, NextLink } from '../core';
3
2
  import { Observable } from '../../utilities';
4
3
  import { BatchHandler } from './batching';
@@ -1 +1 @@
1
- {"version":3,"file":"batchLink.d.ts","sourceRoot":"","sources":["../../../src/link/batch/batchLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAoB,YAAY,EAAE,MAAM,YAAY,CAAC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,UAAU;IACvC,OAAO,CAAC,OAAO,CAAmB;gBAEtB,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO;IAyBpC,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAMlC"}
@@ -1,4 +1,4 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import { ApolloLink } from "../core/index.js";
3
3
  import { OperationBatcher } from "./batching.js";
4
4
  export { OperationBatcher } from "./batching.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { Operation, FetchResult, NextLink } from '../core';
3
2
  import { Observable } from '../../utilities';
4
3
  export declare type BatchHandler = (operations: Operation[], forward?: (NextLink | undefined)[]) => Observable<FetchResult[]> | null;
@@ -1 +1 @@
1
- {"version":3,"file":"batching.d.ts","sourceRoot":"","sources":["../../../src/link/batch/batching.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,oBAAY,YAAY,GAAG,CACzB,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,CAAC,EAAE,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,KAC/B,UAAU,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IAKnB,UAAU,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAA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,4 +1,4 @@
1
- import { __assign } from "tslib/tslib.es6.js";
1
+ import { __assign } from "tslib";
2
2
  import { Observable } from "../../utilities/index.js";
3
3
  var OperationBatcher = (function () {
4
4
  function OperationBatcher(_a) {
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { ApolloLink, Operation, FetchResult } from '../core';
3
2
  import { Observable } from '../../utilities';
4
3
  import { HttpOptions } from '../http';
@@ -1 +1 @@
1
- {"version":3,"file":"batchHttpLink.d.ts","sourceRoot":"","sources":["../../../src/link/batch-http/batchHttpLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAQL,WAAW,EAEZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,yBAAiB,aAAa,CAAC;IAC7B,KAAY,OAAO,GAAG,IAAI,CACxB,SAAS,CAAC,OAAO,EACjB,UAAU,GAAG,eAAe,GAAG,eAAe,GAAG,UAAU,CAC5D,GAAG,WAAW,CAAC;CACjB;AAMD,qBAAa,aAAc,SAAQ,UAAU;IAC3C,OAAO,CAAC,aAAa,CAAC,CAAU;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAa;gBAEhB,WAAW,CAAC,EAAE,aAAa,CAAC,OAAO;IA0LxC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAGrE"}
1
+ {"version":3,"file":"batchHttpLink.d.ts","sourceRoot":"","sources":["../../../src/link/batch-http/batchHttpLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAQL,WAAW,EAEZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,yBAAiB,aAAa,CAAC;IAC7B,KAAY,OAAO,GAAG,IAAI,CACxB,SAAS,CAAC,OAAO,EACjB,UAAU,GAAG,eAAe,GAAG,eAAe,GAAG,UAAU,CAC5D,GAAG,WAAW,CAAC;CACjB;AAMD,qBAAa,aAAc,SAAQ,UAAU;IAC3C,OAAO,CAAC,aAAa,CAAC,CAAU;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAa;gBAEhB,WAAW,CAAC,EAAE,aAAa,CAAC,OAAO;IA0LxC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAGrE"}
@@ -1,4 +1,4 @@
1
- import { __assign, __extends, __rest } from "tslib/tslib.es6.js";
1
+ import { __assign, __extends, __rest } from "tslib";
2
2
  import { ApolloLink } from "../core/index.js";
3
3
  import { Observable } from "../../utilities/index.js";
4
4
  import { fromError } from "../utils/index.js";
@@ -1,4 +1,4 @@
1
- import { __rest } from "tslib/tslib.es6.js";
1
+ import { __rest } from "tslib";
2
2
  import { ApolloLink } from "../core/index.js";
3
3
  import { Observable } from "../../utilities/index.js";
4
4
  export function setContext(setter) {
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { Observable, Observer } from '../../utilities';
3
2
  import { NextLink, Operation, RequestHandler, FetchResult, GraphQLRequest } from './types';
4
3
  export declare class ApolloLink {
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloLink.d.ts","sourceRoot":"","sources":["../../../src/link/core/ApolloLink.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,QAAQ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AACvD,OAAO,EACL,QAAQ,EACR,SAAS,EACT,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAC;AA2BjB,qBAAa,UAAU;WACP,KAAK,IAAI,UAAU;WAInB,IAAI,CAAC,KAAK,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAAE,GAAG,UAAU;WAKxD,KAAK,CACjB,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,OAAO,EAChC,IAAI,EAAE,UAAU,GAAG,cAAc,EACjC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAClC,UAAU;WAmBC,OAAO,CACnB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,cAAc,GACxB,UAAU,CAAC,WAAW,CAAC;WAWZ,MAAM,CAClB,KAAK,EAAE,UAAU,GAAG,cAAc,EAClC,MAAM,EAAE,UAAU,GAAG,cAAc;gBAiCzB,OAAO,CAAC,EAAE,cAAc;IAI7B,KAAK,CACV,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,OAAO,EAChC,IAAI,EAAE,UAAU,GAAG,cAAc,EACjC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAClC,UAAU;IAMN,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,UAAU;IAIrD,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IAIjC,SAAS,CAAC,OAAO,CACf,KAAK,EAAE,GAAG,EACV,QAAQ,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,GAC/B,KAAK,GAAG,IAAI;IAeR,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI;CAInD"}
@@ -1,4 +1,4 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import { InvariantError, invariant } from "../../utilities/globals/index.js";
3
3
  import { Observable } from "../../utilities/index.js";
4
4
  import { validateOperation, createOperation, transformOperation, } from "../utils/index.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { DocumentNode, ExecutionResult } from 'graphql';
3
2
  export { DocumentNode };
4
3
  import { Observable } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/link/core/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAW,CAC1B,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,C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MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAW,CAC1B,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9B,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACjC,SAAQ,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC;IAC3C,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,oBAAY,QAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,KAAK,UAAU,CAAC,WAAW,CAAC,CAAC;AAEzE,oBAAY,cAAc,GAAG,CAC3B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,QAAQ,KACd,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { ExecutionResult } from 'graphql';
3
2
  import { NetworkError, GraphQLErrors } from '../../errors';
4
3
  import { Observable } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/link/error/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,a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K,EAAE,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;KACxD;CACF;AAGD,MAAM,QAAQ,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;AAEpD,wBAAgB,OAAO,CAAC,YAAY,EAAE,YAAY,GAAG,UAAU,CAqE9D;AAED,qBAAa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,IAAI,CAAa;gBACb,YAAY,EAAE,SAAS,CAAC,YAAY;IAKzC,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,QAAQ,GAChB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAGlC"}
@@ -1,4 +1,4 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import { Observable } from "../../utilities/index.js";
3
3
  import { ApolloLink } from "../core/index.js";
4
4
  export function onError(errorHandler) {
@@ -1,4 +1,4 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import { ApolloLink } from "../core/index.js";
3
3
  import { createHttpLink } from "./createHttpLink.js";
4
4
  var HttpLink = (function (_super) {
@@ -1,6 +1,6 @@
1
- import { __assign, __rest } from "tslib/tslib.es6.js";
1
+ import { __assign, __rest } from "tslib";
2
2
  import "../../utilities/globals/index.js";
3
- import { visit } from "graphql/index.mjs";
3
+ import { visit } from 'graphql';
4
4
  import { ApolloLink } from "../core/index.js";
5
5
  import { Observable } from "../../utilities/index.js";
6
6
  import { serializeFetchParameter } from "./serializeFetchParameter.js";
@@ -1,5 +1,5 @@
1
- import { __assign } from "tslib/tslib.es6.js";
2
- import { print } from "graphql/index.mjs";
1
+ import { __assign } from "tslib";
2
+ import { print } from 'graphql';
3
3
  ;
4
4
  var defaultHttpOptions = {
5
5
  includeQuery: true,
@@ -1,6 +1,6 @@
1
- import { __assign } from "tslib/tslib.es6.js";
1
+ import { __assign } from "tslib";
2
2
  import { invariant } from "../../utilities/globals/index.js";
3
- import { print } from "graphql/index.mjs";
3
+ import { print } from 'graphql';
4
4
  import { ApolloLink } from "../core/index.js";
5
5
  import { Observable, compact, } from "../../utilities/index.js";
6
6
  export var VERSION = 1;
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { ApolloLink, Operation, FetchResult, NextLink } from '../core';
3
2
  import { Observable } from '../../utilities';
4
3
  import { DelayFunction, DelayFunctionOptions } from './delayFunction';
@@ -1 +1 @@
1
- {"version":3,"file":"retryLink.d.ts","sourceRoot":"","sources":["../../../src/link/retry/retryLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,UAAU,EAAoC,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AAEzB,yBAAiB,SAAS,CAAC;IACzB,UAAiB,OAAO;QAItB,KAAK,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAAC;QAK7C,QAAQ,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAAC;KACjD;CACF;AAsJD,qBAAa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,OAAO,CAAgB;gBAEnB,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO;IAShC,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC;CAgB3B"}
1
+ {"version":3,"file":"retryLink.d.ts","sourceRoot":"","sources":["../../../src/link/retry/retryLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,UAAU,EAAoC,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,oBAAoB,EAErB,MAAM,iBAAiB,CAAC;AAEzB,yBAAiB,SAAS,CAAC;IACzB,UAAiB,OAAO;QAItB,KAAK,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAAC;QAK7C,QAAQ,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAAC;KACjD;CACF;AAsJD,qBAAa,SAAU,SAAQ,UAAU;IACvC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,OAAO,CAAgB;gBAEnB,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO;IAShC,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC;CAgB3B"}
@@ -1,4 +1,4 @@
1
- import { __awaiter, __extends, __generator } from "tslib/tslib.es6.js";
1
+ import { __awaiter, __extends, __generator } from "tslib";
2
2
  import { ApolloLink } from "../core/index.js";
3
3
  import { Observable } from "../../utilities/index.js";
4
4
  import { buildDelayFunction, } from "./delayFunction.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { GraphQLSchema } from 'graphql';
3
2
  import { ApolloLink, Operation, FetchResult } from '../core';
4
3
  import { Observable } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/link/schema/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,yBAAiB,UAAU,CAAC;IAC1B,KAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClD,KAAY,u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AAC,EAAE,OAAO,CAAC;KACpB;CACF;AAED,qBAAa,UAAW,SAAQ,UAAU;IACjC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3C,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;gBAEb,OAAO,EAAE,UAAU,CAAC,OAAO;IAQhC,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC;CAoC9D"}
@@ -1,5 +1,5 @@
1
- import { __extends } from "tslib/tslib.es6.js";
2
- import { validate, execute } from "graphql/index.mjs";
1
+ import { __extends } from "tslib";
2
+ import { validate, execute } from 'graphql';
3
3
  import { ApolloLink } from "../core/index.js";
4
4
  import { Observable } from "../../utilities/index.js";
5
5
  var SchemaLink = (function (_super) {
@@ -1,4 +1,4 @@
1
- import { __assign } from "tslib/tslib.es6.js";
1
+ import { __assign } from "tslib";
2
2
  export function createOperation(starting, operation) {
3
3
  var context = __assign({}, starting);
4
4
  var setContext = function (next) {
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { Observable } from '../../utilities';
3
2
  export declare function fromError<T>(errorValue: any): Observable<T>;
4
3
  //# sourceMappingURL=fromError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fromError.d.ts","sourceRoot":"","sources":["../../../src/link/utils/fromError.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAI3D"}
1
+ {"version":3,"file":"fromError.d.ts","sourceRoot":"","sources":["../../../src/link/utils/fromError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAI3D"}
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { Observable } from '../../utilities';
3
2
  export declare function fromPromise<T>(promise: Promise<T>): Observable<T>;
4
3
  //# sourceMappingURL=fromPromise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fromPromise.d.ts","sourceRoot":"","sources":["../../../src/link/utils/fromPromise.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CASjE"}
1
+ {"version":3,"file":"fromPromise.d.ts","sourceRoot":"","sources":["../../../src/link/utils/fromPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CASjE"}
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { Observable } from '../../utilities';
3
2
  export declare function toPromise<R>(observable: Observable<R>): Promise<R>;
4
3
  //# sourceMappingURL=toPromise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toPromise.d.ts","sourceRoot":"","sources":["../../../src/link/utils/toPromise.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBlE"}
1
+ {"version":3,"file":"toPromise.d.ts","sourceRoot":"","sources":["../../../src/link/utils/toPromise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBlE"}
@@ -1,4 +1,3 @@
1
- /// <reference types="zen-observable" />
2
1
  import { SubscriptionClient, ClientOptions } from 'subscriptions-transport-ws';
3
2
  import { ApolloLink, Operation, FetchResult } from '../core';
4
3
  import { Observable } from '../../utilities';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/link/ws/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,yBAAiB,aAAa,CAAC;IAI7B,UAAiB,aAAa;QAI5B,GAAG,EAAE,MAAM,CAAC;QAKZ,OAAO,CAAC,EAAE,aAAa,CAAC;QAKxB,aAAa,CAAC,EAAE,GAAG,CAAC;KACrB;CACF;AAGD,MAAM,QAAQ,eAAe,GAAG,aAAa,CAAC,aAAa,CAAC;AAE5D,qBAAa,aAAc,SAAQ,UAAU;IAC3C,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,cAAc,EAAE,aAAa,CAAC,aAAa,GAAG,kBAAkB;IAe3D,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAKrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/link/ws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,yBAAiB,aAAa,CAAC;IAI7B,UAAiB,aAAa;QAI5B,GAAG,EAAE,MAAM,CAAC;QAKZ,OAAO,CAAC,EAAE,aAAa,CAAC;QAKxB,aAAa,CAAC,EAAE,GAAG,CAAC;KACrB;CACF;AAGD,MAAM,QAAQ,eAAe,GAAG,aAAa,CAAC,aAAa,CAAC;AAE5D,qBAAa,aAAc,SAAQ,UAAU;IAC3C,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,cAAc,EAAE,aAAa,CAAC,aAAa,GAAG,kBAAkB;IAe3D,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAKrE"}
package/link/ws/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { __extends } from "tslib/tslib.es6.js";
2
- import { SubscriptionClient } from "subscriptions-transport-ws/dist/index.js";
1
+ import { __extends } from "tslib";
2
+ import { SubscriptionClient } from 'subscriptions-transport-ws';
3
3
  import { ApolloLink } from "../core/index.js";
4
4
  var WebSocketLink = (function (_super) {
5
5
  __extends(WebSocketLink, _super);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo/client",
3
- "version": "3.5.0",
3
+ "version": "3.5.4",
4
4
  "description": "A fully-featured caching GraphQL client.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -48,7 +48,6 @@
48
48
  "@wry/trie": "^0.3.0",
49
49
  "graphql-tag": "^2.12.3",
50
50
  "hoist-non-react-statics": "^3.3.2",
51
- "npm": "^7.24.2",
52
51
  "optimism": "^0.16.1",
53
52
  "prop-types": "^15.7.2",
54
53
  "symbol-observable": "^4.0.0",
@@ -57,10 +56,10 @@
57
56
  "zen-observable-ts": "^1.2.0"
58
57
  },
59
58
  "devDependencies": {
60
- "@babel/parser": "7.16.2",
59
+ "@babel/parser": "7.16.3",
61
60
  "@graphql-tools/schema": "8.3.1",
62
61
  "@rollup/plugin-node-resolve": "11.2.1",
63
- "@testing-library/react": "9.5.0",
62
+ "@testing-library/react": "^12.1.2",
64
63
  "@testing-library/react-hooks": "7.0.2",
65
64
  "@types/fast-json-stable-stringify": "2.0.0",
66
65
  "@types/fetch-mock": "7.3.5",
@@ -68,7 +67,7 @@
68
67
  "@types/hoist-non-react-statics": "3.3.1",
69
68
  "@types/jest": "27.0.2",
70
69
  "@types/lodash": "4.14.176",
71
- "@types/node": "16.11.6",
70
+ "@types/node": "16.11.7",
72
71
  "@types/react": "17.0.34",
73
72
  "@types/react-dom": "17.0.2",
74
73
  "bundlesize": "0.18.1",
@@ -76,7 +75,7 @@
76
75
  "crypto-hash": "1.3.0",
77
76
  "fetch-mock": "9.11.0",
78
77
  "glob": "7.2.0",
79
- "graphql": "^16.0.0",
78
+ "graphql": "16.0.1",
80
79
  "jest": "27.3.1",
81
80
  "jest-fetch-mock": "3.0.3",
82
81
  "jest-junit": "13.0.0",
@@ -1,4 +1,4 @@
1
- import * as PropTypes from "prop-types/index.js";
1
+ import * as PropTypes from 'prop-types';
2
2
  import { useMutation } from "../hooks/index.js";
3
3
  export function Mutation(props) {
4
4
  var _a = useMutation(props.mutation, props), runMutation = _a[0], result = _a[1];
@@ -1,5 +1,5 @@
1
- import { __rest } from "tslib/tslib.es6.js";
2
- import * as PropTypes from "prop-types/index.js";
1
+ import { __rest } from "tslib";
2
+ import * as PropTypes from 'prop-types';
3
3
  import { useQuery } from "../hooks/index.js";
4
4
  export function Query(props) {
5
5
  var children = props.children, query = props.query, options = __rest(props, ["children", "query"]);
@@ -1,4 +1,4 @@
1
- import * as PropTypes from "prop-types/index.js";
1
+ import * as PropTypes from 'prop-types';
2
2
  import { useSubscription } from "../hooks/index.js";
3
3
  export function Subscription(props) {
4
4
  var result = useSubscription(props.subscription, props);
@@ -1,5 +1,5 @@
1
1
  import { invariant } from "../../utilities/globals/index.js";
2
- import * as React from "react/index.js";
2
+ import * as React from 'react';
3
3
  import { getApolloContext } from "./ApolloContext.js";
4
4
  export var ApolloConsumer = function (props) {
5
5
  var ApolloContext = getApolloContext();
@@ -1,4 +1,4 @@
1
- import * as React from "react/index.js";
1
+ import * as React from 'react';
2
2
  import { canUseSymbol } from "../../utilities/index.js";
3
3
  var contextKey = canUseSymbol
4
4
  ? Symbol.for('__APOLLO_CONTEXT__')
@@ -1,5 +1,5 @@
1
1
  import { invariant } from "../../utilities/globals/index.js";
2
- import * as React from "react/index.js";
2
+ import * as React from 'react';
3
3
  import { getApolloContext } from "./ApolloContext.js";
4
4
  export var ApolloProvider = function (_a) {
5
5
  var client = _a.client, children = _a.children;
@@ -1,6 +1,6 @@
1
- import { __extends } from "tslib/tslib.es6.js";
1
+ import { __extends } from "tslib";
2
2
  import { invariant } from "../../utilities/globals/index.js";
3
- import * as React from "react/index.js";
3
+ import * as React from 'react';
4
4
  export var defaultMapPropsToOptions = function () { return ({}); };
5
5
  export var defaultMapResultToProps = function (props) { return props; };
6
6
  export var defaultMapPropsToSkip = function () { return false; };
@@ -1,6 +1,6 @@
1
- import { __assign, __extends, __rest } from "tslib/tslib.es6.js";
2
- import * as React from "react/index.js";
3
- import hoistNonReactStatics from "hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
1
+ import { __assign, __extends, __rest } from "tslib";
2
+ import * as React from 'react';
3
+ import hoistNonReactStatics from 'hoist-non-react-statics';
4
4
  import { parser } from "../parser/index.js";
5
5
  import { Mutation } from "../components/index.js";
6
6
  import { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase } from "./hoc-utils.js";
@@ -1,6 +1,6 @@
1
- import { __assign, __extends, __rest } from "tslib/tslib.es6.js";
2
- import * as React from "react/index.js";
3
- import hoistNonReactStatics from "hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
1
+ import { __assign, __extends, __rest } from "tslib";
2
+ import * as React from 'react';
3
+ import hoistNonReactStatics from 'hoist-non-react-statics';
4
4
  import { parser } from "../parser/index.js";
5
5
  import { Query } from "../components/index.js";
6
6
  import { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from "./hoc-utils.js";
@@ -1,6 +1,6 @@
1
- import { __assign, __extends, __rest } from "tslib/tslib.es6.js";
2
- import * as React from "react/index.js";
3
- import hoistNonReactStatics from "hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
1
+ import { __assign, __extends, __rest } from "tslib";
2
+ import * as React from 'react';
3
+ import hoistNonReactStatics from 'hoist-non-react-statics';
4
4
  import { parser } from "../parser/index.js";
5
5
  import { Subscription } from "../components/index.js";
6
6
  import { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from "./hoc-utils.js";
@@ -1,7 +1,7 @@
1
- import { __assign, __extends } from "tslib/tslib.es6.js";
1
+ import { __assign, __extends } from "tslib";
2
2
  import { invariant } from "../../utilities/globals/index.js";
3
- import * as React from "react/index.js";
4
- import hoistNonReactStatics from "hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";
3
+ import * as React from 'react';
4
+ import hoistNonReactStatics from 'hoist-non-react-statics';
5
5
  import { ApolloConsumer } from "../context/index.js";
6
6
  function getDisplayName(WrappedComponent) {
7
7
  return WrappedComponent.displayName || WrappedComponent.name || 'Component';
@@ -303,63 +303,82 @@ function useMutation(mutation, options) {
303
303
  result: result,
304
304
  mutationId: 0,
305
305
  isMounted: true,
306
+ execute: null,
307
+ client: client,
308
+ mutation: mutation,
309
+ options: options,
306
310
  });
307
- var execute = react.useCallback(function (executeOptions) {
308
- if (executeOptions === void 0) { executeOptions = {}; }
309
- var baseOptions = tslib.__assign(tslib.__assign({}, options), { mutation: mutation });
310
- if (!ref.current.result.loading && !baseOptions.ignoreResults) {
311
- setResult(ref.current.result = {
312
- loading: true,
313
- error: void 0,
314
- data: void 0,
315
- called: true,
316
- client: client,
317
- });
311
+ var execute = react.useMemo(function () {
312
+ if (ref.current.execute != null &&
313
+ ref.current.client === client &&
314
+ equality.equal(options, ref.current.options) &&
315
+ equality.equal(mutation, ref.current.mutation)) {
316
+ return ref.current.execute;
318
317
  }
319
- var mutationId = ++ref.current.mutationId;
320
- var clientOptions = core.mergeOptions(baseOptions, executeOptions);
321
- return client.mutate(clientOptions).then(function (response) {
322
- var _a;
323
- var data = response.data, errors$1 = response.errors;
324
- var error = errors$1 && errors$1.length > 0
325
- ? new errors.ApolloError({ graphQLErrors: errors$1 })
326
- : void 0;
327
- if (mutationId === ref.current.mutationId &&
328
- !baseOptions.ignoreResults) {
329
- var result_1 = {
330
- called: true,
331
- loading: false,
332
- data: data,
333
- error: error,
334
- client: client,
335
- };
336
- if (ref.current.isMounted && !equality.equal(ref.current.result, result_1)) {
337
- setResult(ref.current.result = result_1);
338
- }
339
- }
340
- (_a = baseOptions.onCompleted) === null || _a === void 0 ? void 0 : _a.call(baseOptions, response.data);
341
- return response;
342
- }).catch(function (error) {
343
- if (mutationId === ref.current.mutationId &&
344
- ref.current.isMounted) {
345
- var result_2 = {
346
- loading: false,
347
- error: error,
318
+ ref.current.client = client;
319
+ ref.current.options = options;
320
+ ref.current.mutation = mutation;
321
+ ref.current.execute = function (executeOptions) {
322
+ if (executeOptions === void 0) { executeOptions = {}; }
323
+ var baseOptions = tslib.__assign(tslib.__assign({}, options), { mutation: mutation });
324
+ if (!ref.current.result.loading && !baseOptions.ignoreResults) {
325
+ setResult(ref.current.result = {
326
+ loading: true,
327
+ error: void 0,
348
328
  data: void 0,
349
329
  called: true,
350
330
  client: client,
351
- };
352
- if (!equality.equal(ref.current.result, result_2)) {
353
- setResult(ref.current.result = result_2);
354
- }
355
- }
356
- if (baseOptions.onError) {
357
- baseOptions.onError(error);
358
- return { data: void 0, errors: error };
331
+ });
359
332
  }
360
- throw error;
361
- });
362
- }, [client, options, mutation]);
333
+ var mutationId = ++ref.current.mutationId;
334
+ var clientOptions = core.mergeOptions(baseOptions, executeOptions);
335
+ return client.mutate(clientOptions).then(function (response) {
336
+ var _a, _b;
337
+ var data = response.data, errors$1 = response.errors;
338
+ var error = errors$1 && errors$1.length > 0
339
+ ? new errors.ApolloError({ graphQLErrors: errors$1 })
340
+ : void 0;
341
+ if (mutationId === ref.current.mutationId &&
342
+ !clientOptions.ignoreResults) {
343
+ var result_1 = {
344
+ called: true,
345
+ loading: false,
346
+ data: data,
347
+ error: error,
348
+ client: client,
349
+ };
350
+ if (ref.current.isMounted && !equality.equal(ref.current.result, result_1)) {
351
+ setResult(ref.current.result = result_1);
352
+ }
353
+ }
354
+ (_a = baseOptions.onCompleted) === null || _a === void 0 ? void 0 : _a.call(baseOptions, response.data);
355
+ (_b = executeOptions.onCompleted) === null || _b === void 0 ? void 0 : _b.call(executeOptions, response.data);
356
+ return response;
357
+ }).catch(function (error) {
358
+ var _a, _b;
359
+ if (mutationId === ref.current.mutationId &&
360
+ ref.current.isMounted) {
361
+ var result_2 = {
362
+ loading: false,
363
+ error: error,
364
+ data: void 0,
365
+ called: true,
366
+ client: client,
367
+ };
368
+ if (!equality.equal(ref.current.result, result_2)) {
369
+ setResult(ref.current.result = result_2);
370
+ }
371
+ }
372
+ if (baseOptions.onError || clientOptions.onError) {
373
+ (_a = baseOptions.onError) === null || _a === void 0 ? void 0 : _a.call(baseOptions, error);
374
+ (_b = executeOptions.onError) === null || _b === void 0 ? void 0 : _b.call(executeOptions, error);
375
+ return { data: void 0, errors: error };
376
+ }
377
+ throw error;
378
+ });
379
+ };
380
+ return ref.current.execute;
381
+ }, [client, mutation, options]);
363
382
  var reset = react.useCallback(function () {
364
383
  setResult({ called: false, loading: false, client: client });
365
384
  }, []);