@apollo/client 3.8.0-beta.4 → 3.8.0-beta.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 (115) hide show
  1. package/apollo-client.cjs +225 -175
  2. package/apollo-client.cjs.map +1 -1
  3. package/apollo-client.min.cjs +1 -1
  4. package/cache/inmemory/writeToStore.js.map +1 -1
  5. package/core/ApolloClient.js +4 -3
  6. package/core/LocalState.js +2 -2
  7. package/core/ObservableQuery.d.ts +2 -0
  8. package/core/ObservableQuery.d.ts.map +1 -1
  9. package/core/ObservableQuery.js +26 -9
  10. package/core/ObservableQuery.js.map +1 -1
  11. package/core/QueryManager.d.ts +2 -2
  12. package/core/QueryManager.d.ts.map +1 -1
  13. package/core/QueryManager.js +9 -9
  14. package/core/QueryManager.js.map +1 -1
  15. package/core/core.cjs +42 -24
  16. package/core/core.cjs.map +1 -1
  17. package/core/core.cjs.native.js +42 -24
  18. package/dev/dev.cjs +73 -80
  19. package/dev/dev.cjs.map +1 -1
  20. package/dev/dev.cjs.native.js +73 -80
  21. package/invariantErrorCodes.js +72 -79
  22. package/link/core/ApolloLink.js +2 -2
  23. package/link/core/core.cjs +2 -2
  24. package/link/core/core.cjs.map +1 -1
  25. package/link/core/core.cjs.native.js +2 -2
  26. package/link/http/checkFetcher.js +1 -1
  27. package/link/http/createHttpLink.js +1 -1
  28. package/link/http/http.cjs +3 -3
  29. package/link/http/http.cjs.map +1 -1
  30. package/link/http/http.cjs.native.js +3 -3
  31. package/link/http/serializeFetchParameter.js +1 -1
  32. package/link/persisted-queries/index.js +2 -2
  33. package/link/persisted-queries/persisted-queries.cjs +2 -2
  34. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  35. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  36. package/link/utils/toPromise.js +1 -1
  37. package/link/utils/utils.cjs +2 -2
  38. package/link/utils/utils.cjs.map +1 -1
  39. package/link/utils/utils.cjs.native.js +2 -2
  40. package/link/utils/validateOperation.js +1 -1
  41. package/package.json +16 -16
  42. package/react/cache/QueryReference.d.ts +9 -3
  43. package/react/cache/QueryReference.d.ts.map +1 -1
  44. package/react/cache/QueryReference.js +50 -20
  45. package/react/cache/QueryReference.js.map +1 -1
  46. package/react/cache/SuspenseCache.d.ts +2 -2
  47. package/react/cache/SuspenseCache.d.ts.map +1 -1
  48. package/react/cache/SuspenseCache.js +2 -2
  49. package/react/cache/SuspenseCache.js.map +1 -1
  50. package/react/context/ApolloConsumer.js +1 -1
  51. package/react/context/ApolloContext.js +1 -1
  52. package/react/context/ApolloProvider.js +1 -1
  53. package/react/context/context.cjs +3 -3
  54. package/react/context/context.cjs.map +1 -1
  55. package/react/context/context.cjs.native.js +3 -3
  56. package/react/hoc/hoc-utils.js +1 -1
  57. package/react/hoc/hoc.cjs +2 -2
  58. package/react/hoc/hoc.cjs.map +1 -1
  59. package/react/hoc/hoc.cjs.native.js +2 -2
  60. package/react/hoc/withApollo.js +1 -1
  61. package/react/hooks/hooks.cjs +174 -27
  62. package/react/hooks/hooks.cjs.map +1 -1
  63. package/react/hooks/hooks.cjs.native.js +174 -27
  64. package/react/hooks/index.d.ts +2 -1
  65. package/react/hooks/index.d.ts.map +1 -1
  66. package/react/hooks/index.js +2 -1
  67. package/react/hooks/index.js.map +1 -1
  68. package/react/hooks/useApolloClient.js +1 -1
  69. package/react/hooks/useBackgroundQuery.d.ts +16 -13
  70. package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
  71. package/react/hooks/useBackgroundQuery.js +8 -44
  72. package/react/hooks/useBackgroundQuery.js.map +1 -1
  73. package/react/hooks/useQuery.js +1 -1
  74. package/react/hooks/useReadQuery.d.ts +8 -0
  75. package/react/hooks/useReadQuery.d.ts.map +1 -0
  76. package/react/hooks/useReadQuery.js +42 -0
  77. package/react/hooks/useReadQuery.js.map +1 -0
  78. package/react/hooks/useSubscription.js +2 -2
  79. package/react/hooks/useSuspenseCache.js +1 -1
  80. package/react/hooks/useSuspenseQuery.d.ts +2 -2
  81. package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
  82. package/react/hooks/useSuspenseQuery.js +5 -6
  83. package/react/hooks/useSuspenseQuery.js.map +1 -1
  84. package/react/hooks/useSyncExternalStore.js +1 -1
  85. package/react/parser/index.js +5 -5
  86. package/react/parser/parser.cjs +5 -5
  87. package/react/parser/parser.cjs.map +1 -1
  88. package/react/parser/parser.cjs.native.js +5 -5
  89. package/react/react.cjs +49 -20
  90. package/react/react.cjs.map +1 -1
  91. package/react/react.cjs.native.js +49 -20
  92. package/react/types/types.d.ts +6 -0
  93. package/react/types/types.d.ts.map +1 -1
  94. package/react/types/types.js.map +1 -1
  95. package/testing/core/core.cjs +1 -1
  96. package/testing/core/core.cjs.map +1 -1
  97. package/testing/core/core.cjs.native.js +1 -1
  98. package/testing/core/mocking/mockLink.js +1 -1
  99. package/utilities/globals/globals.cjs +1 -1
  100. package/utilities/globals/globals.cjs.map +1 -1
  101. package/utilities/globals/globals.cjs.native.js +1 -1
  102. package/utilities/graphql/DocumentTransform.js +1 -1
  103. package/utilities/graphql/directives.js +4 -4
  104. package/utilities/graphql/fragments.js +3 -3
  105. package/utilities/graphql/getFromAST.js +8 -8
  106. package/utilities/graphql/storeUtils.js +1 -1
  107. package/utilities/graphql/transform.js +2 -2
  108. package/utilities/index.js.map +1 -1
  109. package/utilities/promises/decoration.d.ts.map +1 -1
  110. package/utilities/promises/decoration.js +1 -0
  111. package/utilities/promises/decoration.js.map +1 -1
  112. package/utilities/utilities.cjs +20 -19
  113. package/utilities/utilities.cjs.map +1 -1
  114. package/utilities/utilities.cjs.native.js +20 -19
  115. package/version.js +1 -1
@@ -2,12 +2,16 @@ import type { ApolloQueryResult, ObservableQuery, OperationVariables, WatchQuery
2
2
  import type { CacheKey } from './types';
3
3
  type Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;
4
4
  type FetchMoreOptions<TData> = Parameters<ObservableQuery<TData>['fetchMore']>[0];
5
- interface QueryReferenceOptions {
5
+ export declare const QUERY_REFERENCE_SYMBOL: unique symbol;
6
+ export interface QueryReference<TData = unknown> {
7
+ [QUERY_REFERENCE_SYMBOL]: InternalQueryReference<TData>;
8
+ }
9
+ interface InternalQueryReferenceOptions {
6
10
  key: CacheKey;
7
11
  onDispose?: () => void;
8
12
  autoDisposeTimeoutMs?: number;
9
13
  }
10
- export declare class QueryReference<TData = unknown> {
14
+ export declare class InternalQueryReference<TData = unknown> {
11
15
  result: ApolloQueryResult<TData>;
12
16
  readonly key: CacheKey;
13
17
  readonly observable: ObservableQuery<TData>;
@@ -20,8 +24,10 @@ export declare class QueryReference<TData = unknown> {
20
24
  private refetching;
21
25
  private resolve;
22
26
  private reject;
23
- constructor(observable: ObservableQuery<TData>, options: QueryReferenceOptions);
27
+ constructor(observable: ObservableQuery<TData>, options: InternalQueryReferenceOptions);
24
28
  get watchQueryOptions(): WatchQueryOptions<OperationVariables, TData>;
29
+ didChangeOptions(watchQueryOptions: WatchQueryOptions): boolean;
30
+ applyOptions(watchQueryOptions: WatchQueryOptions): Promise<ApolloQueryResult<TData>>;
25
31
  listen(listener: Listener<TData>): () => void;
26
32
  refetch(variables: OperationVariables | undefined): Promise<ApolloQueryResult<TData>>;
27
33
  fetchMore(options: FetchMoreOptions<TData>): Promise<ApolloQueryResult<TData>>;
@@ -1 +1 @@
1
- {"version":3,"file":"QueryReference.d.ts","sourceRoot":"","sources":["../../../src/react/cache/QueryReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,QAAQ,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC;AAE5E,KAAK,gBAAgB,CAAC,KAAK,IAAI,UAAU,CACv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AO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,oBAAoB,CAAiB;IAC7C,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,OAAO,CAA2D;IAC1E,OAAO,CAAC,MAAM,CAAyC;gBAGrD,UAAU,EAAE,eAAe,CAAC,KAAK,CAAC,EAClC,OAAO,EAAE,6BAA6B;IA8CxC,IAAI,iBAAiB,iDAEpB;IAED,gBAAgB,CAAC,iBAAiB,EAAE,iBAAiB;IAOrD,YAAY,CAAC,iBAAiB,EAAE,iBAAiB;IAsBjD,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IAahC,OAAO,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS;IAUjD,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAQ1C,SAAS,CACP,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAS1E,OAAO;IAKP,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,OAAO;CAGhB"}
@@ -1,8 +1,18 @@
1
1
  import { __assign } from "tslib";
2
+ import { equal } from '@wry/equality';
2
3
  import { NetworkStatus, isNetworkRequestSettled } from "../../core/index.js";
3
4
  import { createFulfilledPromise, createRejectedPromise } from "../../utilities/index.js";
4
- var QueryReference = (function () {
5
- function QueryReference(observable, options) {
5
+ export var QUERY_REFERENCE_SYMBOL = Symbol();
6
+ var OBSERVED_CHANGED_OPTIONS = [
7
+ 'canonizeResults',
8
+ 'context',
9
+ 'errorPolicy',
10
+ 'fetchPolicy',
11
+ 'refetchWritePolicy',
12
+ 'returnPartialData',
13
+ ];
14
+ var InternalQueryReference = (function () {
15
+ function InternalQueryReference(observable, options) {
6
16
  var _this = this;
7
17
  var _a;
8
18
  this.listeners = new Set();
@@ -37,14 +47,33 @@ var QueryReference = (function () {
37
47
  }
38
48
  this.autoDisposeTimeoutId = setTimeout(this.dispose, (_a = options.autoDisposeTimeoutMs) !== null && _a !== void 0 ? _a : 30000);
39
49
  }
40
- Object.defineProperty(QueryReference.prototype, "watchQueryOptions", {
50
+ Object.defineProperty(InternalQueryReference.prototype, "watchQueryOptions", {
41
51
  get: function () {
42
52
  return this.observable.options;
43
53
  },
44
54
  enumerable: false,
45
55
  configurable: true
46
56
  });
47
- QueryReference.prototype.listen = function (listener) {
57
+ InternalQueryReference.prototype.didChangeOptions = function (watchQueryOptions) {
58
+ var _this = this;
59
+ return OBSERVED_CHANGED_OPTIONS.some(function (option) {
60
+ return !equal(_this.watchQueryOptions[option], watchQueryOptions[option]);
61
+ });
62
+ };
63
+ InternalQueryReference.prototype.applyOptions = function (watchQueryOptions) {
64
+ var currentFetchPolicy = this.watchQueryOptions.fetchPolicy;
65
+ if (currentFetchPolicy === 'standby' &&
66
+ currentFetchPolicy !== watchQueryOptions.fetchPolicy) {
67
+ this.promise = this.observable.reobserve(watchQueryOptions);
68
+ }
69
+ else {
70
+ this.observable.silentSetOptions(watchQueryOptions);
71
+ this.result = __assign(__assign({}, this.result), this.observable.getCurrentResult());
72
+ this.promise = createFulfilledPromise(this.result);
73
+ }
74
+ return this.promise;
75
+ };
76
+ InternalQueryReference.prototype.listen = function (listener) {
48
77
  var _this = this;
49
78
  clearTimeout(this.autoDisposeTimeoutId);
50
79
  this.listeners.add(listener);
@@ -52,29 +81,29 @@ var QueryReference = (function () {
52
81
  _this.listeners.delete(listener);
53
82
  };
54
83
  };
55
- QueryReference.prototype.refetch = function (variables) {
84
+ InternalQueryReference.prototype.refetch = function (variables) {
56
85
  this.refetching = true;
57
86
  var promise = this.observable.refetch(variables);
58
87
  this.promise = promise;
59
88
  return promise;
60
89
  };
61
- QueryReference.prototype.fetchMore = function (options) {
90
+ InternalQueryReference.prototype.fetchMore = function (options) {
62
91
  var promise = this.observable.fetchMore(options);
63
92
  this.promise = promise;
64
93
  return promise;
65
94
  };
66
- QueryReference.prototype.reobserve = function (watchQueryOptions) {
95
+ InternalQueryReference.prototype.reobserve = function (watchQueryOptions) {
67
96
  var promise = this.observable.reobserve(watchQueryOptions);
68
97
  this.promise = promise;
69
98
  return promise;
70
99
  };
71
- QueryReference.prototype.dispose = function () {
100
+ InternalQueryReference.prototype.dispose = function () {
72
101
  this.subscription.unsubscribe();
73
102
  this.onDispose();
74
103
  };
75
- QueryReference.prototype.onDispose = function () {
104
+ InternalQueryReference.prototype.onDispose = function () {
76
105
  };
77
- QueryReference.prototype.handleNext = function (result) {
106
+ InternalQueryReference.prototype.handleNext = function (result) {
78
107
  if (!this.initialized || this.refetching) {
79
108
  if (!isNetworkRequestSettled(result.networkStatus)) {
80
109
  return;
@@ -85,7 +114,9 @@ var QueryReference = (function () {
85
114
  this.initialized = true;
86
115
  this.refetching = false;
87
116
  this.result = result;
88
- this.resolve(result);
117
+ if (this.resolve) {
118
+ this.resolve(result);
119
+ }
89
120
  return;
90
121
  }
91
122
  if (result.data === this.result.data) {
@@ -95,25 +126,24 @@ var QueryReference = (function () {
95
126
  this.promise = createFulfilledPromise(result);
96
127
  this.deliver(this.promise);
97
128
  };
98
- QueryReference.prototype.handleError = function (error) {
129
+ InternalQueryReference.prototype.handleError = function (error) {
99
130
  var result = __assign(__assign({}, this.result), { error: error, networkStatus: NetworkStatus.error });
100
131
  this.result = result;
101
132
  if (!this.initialized || this.refetching) {
102
133
  this.initialized = true;
103
134
  this.refetching = false;
104
- this.reject(error);
135
+ if (this.reject) {
136
+ this.reject(error);
137
+ }
105
138
  return;
106
139
  }
107
- this.result = result;
108
- this.promise = result.data
109
- ? createFulfilledPromise(result)
110
- : createRejectedPromise(result);
140
+ this.promise = createRejectedPromise(error);
111
141
  this.deliver(this.promise);
112
142
  };
113
- QueryReference.prototype.deliver = function (promise) {
143
+ InternalQueryReference.prototype.deliver = function (promise) {
114
144
  this.listeners.forEach(function (listener) { return listener(promise); });
115
145
  };
116
- return QueryReference;
146
+ return InternalQueryReference;
117
147
  }());
118
- export { QueryReference };
148
+ export { InternalQueryReference };
119
149
  //# sourceMappingURL=QueryReference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryReference.js","sourceRoot":"","sources":["../../../src/react/cache/QueryReference.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAehF;IAiBE,wBACE,UAAkC,EAClC,OAA8B;QAFhC,iBA8CC;;QAtDO,cAAS,GAAG,IAAI,GAAG,EAAmB,CAAC;QAEvC,gBAAW,GAAG,KAAK,CAAC;QACpB,eAAU,GAAG,KAAK,CAAC;QASzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QAEvB,IAAI,OAAO,CAAC,SAAS,EAAE;YACrB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;SACpC;QAED,IACE,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAClD,CAAC,IAAI,CAAC,MAAM,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I,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACpC,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEO,oCAAW,GAAnB,UAAoB,KAAkB;QACpC,IAAM,MAAM,yBACP,IAAI,CAAC,MAAM,KACd,KAAK,OAAA,EACL,aAAa,EAAE,aAAa,CAAC,KAAK,GACnC,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,UAAU,EAAE;YACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;SACR;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI;YACxB,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC;YAChC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEO,gCAAO,GAAf,UAAgB,OAA0C;QACxD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,OAAO,CAAC,EAAjB,CAAiB,CAAC,CAAC;IAC1D,CAAC;IACH,qBAAC;AAAD,CAAC,AA9KD,IA8KC","sourcesContent":["import type {\n ApolloError,\n ApolloQueryResult,\n ObservableQuery,\n OperationVariables,\n WatchQueryOptions,\n} from '../../core';\nimport { NetworkStatus, isNetworkRequestSettled } from '../../core';\nimport type { ObservableSubscription } from '../../utilities';\nimport { createFulfilledPromise, createRejectedPromise } from '../../utilities';\nimport type { CacheKey } from './types';\n\ntype Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;\n\ntype FetchMoreOptions<TData> = Parameters<\n ObservableQuery<TData>['fetchMore']\n>[0];\n\ninterface QueryReferenceOptions {\n key: CacheKey;\n onDispose?: () => void;\n autoDisposeTimeoutMs?: number;\n}\n\nexport class QueryReference<TData = unknown> {\n public result: ApolloQueryResult<TData>;\n public readonly key: CacheKey;\n public readonly observable: ObservableQuery<TData>;\n\n public promiseCache?: Map<any[], Promise<ApolloQueryResult<TData>>>;\n public promise: Promise<ApolloQueryResult<TData>>;\n\n private subscription: ObservableSubscription;\n private listeners = new Set<Listener<TData>>();\n private autoDisposeTimeoutId: NodeJS.Timeout;\n private initialized = false;\n private refetching = false;\n\n private resolve: (result: ApolloQueryResult<TData>) => void;\n private reject: (error: unknown) => void;\n\n constructor(\n observable: ObservableQuery<TData>,\n options: QueryReferenceOptions\n ) {\n this.listen = this.listen.bind(this);\n this.handleNext = this.handleNext.bind(this);\n this.handleError = this.handleError.bind(this);\n this.dispose = this.dispose.bind(this);\n this.observable = observable;\n this.result = observable.getCurrentResult(false);\n this.key = options.key;\n\n if (options.onDispose) {\n this.onDispose = options.onDispose;\n }\n\n if (\n isNetworkRequestSettled(this.result.networkStatus) ||\n (this.result.data &&\n (!this.result.partial || this.observable.options.returnPartialData))\n ) {\n this.promise = createFulfilledPromise(this.result);\n this.initialized = true;\n this.refetching = false;\n }\n\n this.subscription = observable.subscribe({\n next: this.handleNext,\n error: this.handleError,\n });\n\n if (!this.promise) {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n\n // Start a timer that will automatically dispose of the query if the\n // suspended resource does not use this queryRef in the given time. This\n // helps prevent memory leaks when a component has unmounted before the\n // query has finished loading.\n this.autoDisposeTimeoutId = setTimeout(\n this.dispose,\n options.autoDisposeTimeoutMs ?? 30_000\n );\n }\n\n get watchQueryOptions() {\n return this.observable.options;\n }\n\n listen(listener: Listener<TData>) {\n // As soon as the component listens for updates, we know it has finished\n // suspending and is ready to receive updates, so we can remove the auto\n // dispose timer.\n clearTimeout(this.autoDisposeTimeoutId);\n\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n refetch(variables: OperationVariables | undefined) {\n this.refetching = true;\n\n const promise = this.observable.refetch(variables);\n\n this.promise = promise;\n\n return promise;\n }\n\n fetchMore(options: FetchMoreOptions<TData>) {\n const promise = this.observable.fetchMore<TData>(options);\n\n this.promise = promise;\n\n return promise;\n }\n\n reobserve(\n watchQueryOptions: Partial<WatchQueryOptions<OperationVariables, TData>>\n ) {\n const promise = this.observable.reobserve(watchQueryOptions);\n\n this.promise = promise;\n\n return promise;\n }\n\n dispose() {\n this.subscription.unsubscribe();\n this.onDispose();\n }\n\n private onDispose() {\n // noop. overridable by options\n }\n\n private handleNext(result: ApolloQueryResult<TData>) {\n if (!this.initialized || this.refetching) {\n if (!isNetworkRequestSettled(result.networkStatus)) {\n return;\n }\n\n // If we encounter an error with the new result after we have successfully\n // fetched a previous result, set the new result data to the last successful\n // result.\n if (this.result.data && result.data === void 0) {\n result.data = this.result.data;\n }\n\n this.initialized = true;\n this.refetching = false;\n this.result = result;\n this.resolve(result);\n return;\n }\n\n if (result.data === this.result.data) {\n return;\n }\n\n this.result = result;\n this.promise = createFulfilledPromise(result);\n this.deliver(this.promise);\n }\n\n private handleError(error: ApolloError) {\n const result = {\n ...this.result,\n error,\n networkStatus: NetworkStatus.error,\n };\n\n this.result = result;\n\n if (!this.initialized || this.refetching) {\n this.initialized = true;\n this.refetching = false;\n this.reject(error);\n return;\n }\n\n this.result = result;\n this.promise = result.data\n ? createFulfilledPromise(result)\n : createRejectedPromise(result);\n this.deliver(this.promise);\n }\n\n private deliver(promise: Promise<ApolloQueryResult<TData>>) {\n this.listeners.forEach((listener) => listener(promise));\n }\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C,IAAM,MAAM,yBACP,IAAI,CAAC,MAAM,KACd,KAAK,OAAA,EACL,aAAa,EAAE,aAAa,CAAC,KAAK,GACnC,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,UAAU,EAAE;YACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACpB;YACD,OAAO;SACR;QAED,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEO,wCAAO,GAAf,UAAgB,OAA0C;QACxD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,OAAO,CAAC,EAAjB,CAAiB,CAAC,CAAC;IAC1D,CAAC;IACH,6BAAC;AAAD,CAAC,AA5MD,IA4MC","sourcesContent":["import { equal } from '@wry/equality';\nimport type {\n ApolloError,\n ApolloQueryResult,\n ObservableQuery,\n OperationVariables,\n WatchQueryOptions,\n} from '../../core';\nimport { NetworkStatus, isNetworkRequestSettled } from '../../core';\nimport type { ObservableSubscription } from '../../utilities';\nimport { createFulfilledPromise, createRejectedPromise } from '../../utilities';\nimport type { CacheKey } from './types';\nimport type { useBackgroundQuery, useReadQuery } from '../hooks';\n\ntype Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;\n\ntype FetchMoreOptions<TData> = Parameters<\n ObservableQuery<TData>['fetchMore']\n>[0];\n\nexport const QUERY_REFERENCE_SYMBOL: unique symbol = Symbol();\n/**\n * A `QueryReference` is an opaque object returned by {@link useBackgroundQuery}.\n * A child component reading the `QueryReference` via {@link useReadQuery} will\n * suspend until the promise resolves.\n */\nexport interface QueryReference<TData = unknown> {\n [QUERY_REFERENCE_SYMBOL]: InternalQueryReference<TData>;\n}\n\ninterface InternalQueryReferenceOptions {\n key: CacheKey;\n onDispose?: () => void;\n autoDisposeTimeoutMs?: number;\n}\n\nconst OBSERVED_CHANGED_OPTIONS: Array<keyof WatchQueryOptions> = [\n 'canonizeResults',\n 'context',\n 'errorPolicy',\n 'fetchPolicy',\n 'refetchWritePolicy',\n 'returnPartialData',\n];\n\nexport class InternalQueryReference<TData = unknown> {\n public result: ApolloQueryResult<TData>;\n public readonly key: CacheKey;\n public readonly observable: ObservableQuery<TData>;\n\n public promiseCache?: Map<any[], Promise<ApolloQueryResult<TData>>>;\n public promise: Promise<ApolloQueryResult<TData>>;\n\n private subscription: ObservableSubscription;\n private listeners = new Set<Listener<TData>>();\n private autoDisposeTimeoutId: NodeJS.Timeout;\n private initialized = false;\n private refetching = false;\n\n private resolve: ((result: ApolloQueryResult<TData>) => void) | undefined;\n private reject: ((error: unknown) => void) | undefined;\n\n constructor(\n observable: ObservableQuery<TData>,\n options: InternalQueryReferenceOptions\n ) {\n this.listen = this.listen.bind(this);\n this.handleNext = this.handleNext.bind(this);\n this.handleError = this.handleError.bind(this);\n this.dispose = this.dispose.bind(this);\n this.observable = observable;\n this.result = observable.getCurrentResult(false);\n this.key = options.key;\n\n if (options.onDispose) {\n this.onDispose = options.onDispose;\n }\n\n if (\n isNetworkRequestSettled(this.result.networkStatus) ||\n (this.result.data &&\n (!this.result.partial || this.observable.options.returnPartialData))\n ) {\n this.promise = createFulfilledPromise(this.result);\n this.initialized = true;\n this.refetching = false;\n }\n\n this.subscription = observable.subscribe({\n next: this.handleNext,\n error: this.handleError,\n });\n\n if (!this.promise) {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n\n // Start a timer that will automatically dispose of the query if the\n // suspended resource does not use this queryRef in the given time. This\n // helps prevent memory leaks when a component has unmounted before the\n // query has finished loading.\n this.autoDisposeTimeoutId = setTimeout(\n this.dispose,\n options.autoDisposeTimeoutMs ?? 30_000\n );\n }\n\n get watchQueryOptions() {\n return this.observable.options;\n }\n\n didChangeOptions(watchQueryOptions: WatchQueryOptions) {\n return OBSERVED_CHANGED_OPTIONS.some(\n (option) =>\n !equal(this.watchQueryOptions[option], watchQueryOptions[option])\n );\n }\n\n applyOptions(watchQueryOptions: WatchQueryOptions) {\n const { fetchPolicy: currentFetchPolicy } = this.watchQueryOptions;\n\n // \"standby\" is used when `skip` is set to `true`. Detect when we've\n // enabled the query (i.e. `skip` is `false`) to execute a network request.\n if (\n currentFetchPolicy === 'standby' &&\n currentFetchPolicy !== watchQueryOptions.fetchPolicy\n ) {\n this.promise = this.observable.reobserve(watchQueryOptions);\n } else {\n this.observable.silentSetOptions(watchQueryOptions);\n\n // Maintain the previous result in case the current result does not return\n // a `data` property.\n this.result = { ...this.result, ...this.observable.getCurrentResult() };\n this.promise = createFulfilledPromise(this.result);\n }\n\n return this.promise;\n }\n\n listen(listener: Listener<TData>) {\n // As soon as the component listens for updates, we know it has finished\n // suspending and is ready to receive updates, so we can remove the auto\n // dispose timer.\n clearTimeout(this.autoDisposeTimeoutId);\n\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n refetch(variables: OperationVariables | undefined) {\n this.refetching = true;\n\n const promise = this.observable.refetch(variables);\n\n this.promise = promise;\n\n return promise;\n }\n\n fetchMore(options: FetchMoreOptions<TData>) {\n const promise = this.observable.fetchMore<TData>(options);\n\n this.promise = promise;\n\n return promise;\n }\n\n reobserve(\n watchQueryOptions: Partial<WatchQueryOptions<OperationVariables, TData>>\n ) {\n const promise = this.observable.reobserve(watchQueryOptions);\n\n this.promise = promise;\n\n return promise;\n }\n\n dispose() {\n this.subscription.unsubscribe();\n this.onDispose();\n }\n\n private onDispose() {\n // noop. overridable by options\n }\n\n private handleNext(result: ApolloQueryResult<TData>) {\n if (!this.initialized || this.refetching) {\n if (!isNetworkRequestSettled(result.networkStatus)) {\n return;\n }\n\n // If we encounter an error with the new result after we have successfully\n // fetched a previous result, set the new result data to the last successful\n // result.\n if (this.result.data && result.data === void 0) {\n result.data = this.result.data;\n }\n\n this.initialized = true;\n this.refetching = false;\n this.result = result;\n if (this.resolve) {\n this.resolve(result);\n }\n return;\n }\n\n if (result.data === this.result.data) {\n return;\n }\n\n this.result = result;\n this.promise = createFulfilledPromise(result);\n this.deliver(this.promise);\n }\n\n private handleError(error: ApolloError) {\n const result = {\n ...this.result,\n error,\n networkStatus: NetworkStatus.error,\n };\n\n this.result = result;\n\n if (!this.initialized || this.refetching) {\n this.initialized = true;\n this.refetching = false;\n if (this.reject) {\n this.reject(error);\n }\n return;\n }\n\n this.promise = createRejectedPromise(error);\n this.deliver(this.promise);\n }\n\n private deliver(promise: Promise<ApolloQueryResult<TData>>) {\n this.listeners.forEach((listener) => listener(promise));\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ObservableQuery } from '../../core';
2
- import { QueryReference } from './QueryReference';
2
+ import { InternalQueryReference } from './QueryReference';
3
3
  import type { CacheKey } from './types';
4
4
  interface SuspenseCacheOptions {
5
5
  autoDisposeTimeoutMs?: number;
@@ -8,7 +8,7 @@ export declare class SuspenseCache {
8
8
  private queryRefs;
9
9
  private options;
10
10
  constructor(options?: SuspenseCacheOptions);
11
- getQueryRef<TData = any>(cacheKey: CacheKey, createObservable: () => ObservableQuery<TData>): QueryReference<TData>;
11
+ getQueryRef<TData = any>(cacheKey: CacheKey, createObservable: () => ObservableQuery<TData>): InternalQueryReference<TData>;
12
12
  }
13
13
  export {};
14
14
  //# sourceMappingURL=SuspenseCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SuspenseCache.d.ts","sourceRoot":"","sources":["../../../src/react/cache/SuspenseCache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,oBAAoB;IAW5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,SAAS,CAAyD;IAC1E,OAAO,CAAC,OAAO,CAAuB;gBAE1B,OAAO,GAAE,oBAA0C;IAI/D,WAAW,CAAC,KAAK,GAAG,GAAG,EACrB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,MAAM,eAAe,CAAC,KAAK,CAAC;CAgBjD"}
1
+ {"version":3,"file":"SuspenseCache.d.ts","sourceRoot":"","sources":["../../../src/react/cache/SuspenseCache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,oBAAoB;IAW5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,SAAS,CAAiE;IAClF,OAAO,CAAC,OAAO,CAAuB;gBAE1B,OAAO,GAAE,oBAA0C;IAI/D,WAAW,CAAC,KAAK,GAAG,GAAG,EACrB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,MAAM,eAAe,CAAC,KAAK,CAAC;CAgBjD"}
@@ -1,6 +1,6 @@
1
1
  import { Trie } from '@wry/trie';
2
2
  import { canUseWeakMap } from "../../utilities/index.js";
3
- import { QueryReference } from "./QueryReference.js";
3
+ import { InternalQueryReference } from "./QueryReference.js";
4
4
  var SuspenseCache = (function () {
5
5
  function SuspenseCache(options) {
6
6
  if (options === void 0) { options = Object.create(null); }
@@ -10,7 +10,7 @@ var SuspenseCache = (function () {
10
10
  SuspenseCache.prototype.getQueryRef = function (cacheKey, createObservable) {
11
11
  var ref = this.queryRefs.lookupArray(cacheKey);
12
12
  if (!ref.current) {
13
- ref.current = new QueryReference(createObservable(), {
13
+ ref.current = new InternalQueryReference(createObservable(), {
14
14
  key: cacheKey,
15
15
  autoDisposeTimeoutMs: this.options.autoDisposeTimeoutMs,
16
16
  onDispose: function () {
@@ -1 +1 @@
1
- {"version":3,"file":"SuspenseCache.js","sourceRoot":"","sources":["../../../src/react/cache/SuspenseCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBlD;IAIE,uBAAY,OAAmD;QAAnD,wBAAA,EAAA,UAAgC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QAHvD,cAAS,GAAG,IAAI,IAAI,CAA+B,aAAa,CAAC,CAAC;QAIxE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,mCAAW,GAAX,UACE,QAAkB,EAClB,gBAA8C;QAE9C,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,GAAG,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,gBAAgB,EAAE,EAAE;gBACnD,GAAG,EAAE,QAAQ;gBACb,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,oBAAoB;gBACvD,SAAS,EAAE;oBACT,OAAO,GAAG,CAAC,OAAO,CAAC;gBACrB,CAAC;aACF,CAAC,CAAC;SACJ;QAED,OAAO,GAAG,CAAC,OAAgC,CAAC;IAC9C,CAAC;IACH,oBAAC;AAAD,CAAC,AA1BD,IA0BC","sourcesContent":["import { Trie } from '@wry/trie';\nimport type { ObservableQuery } from '../../core';\nimport { canUseWeakMap } from '../../utilities';\nimport { QueryReference } from './QueryReference';\nimport type { CacheKey } from './types';\n\ninterface SuspenseCacheOptions {\n /**\n * Specifies the amount of time, in milliseconds, the suspense cache will wait\n * for a suspended component to read from the suspense cache before it\n * automatically disposes of the query. This prevents memory leaks when a\n * component unmounts before a suspended resource finishes loading. Increase\n * the timeout if your queries take longer than than the specified time to\n * prevent your queries from suspending over and over.\n *\n * Defaults to 30 seconds.\n */\n autoDisposeTimeoutMs?: number;\n}\n\nexport class SuspenseCache {\n private queryRefs = new Trie<{ current?: QueryReference }>(canUseWeakMap);\n private options: SuspenseCacheOptions;\n\n constructor(options: SuspenseCacheOptions = Object.create(null)) {\n this.options = options;\n }\n\n getQueryRef<TData = any>(\n cacheKey: CacheKey,\n createObservable: () => ObservableQuery<TData>\n ) {\n const ref = this.queryRefs.lookupArray(cacheKey);\n\n if (!ref.current) {\n ref.current = new QueryReference(createObservable(), {\n key: cacheKey,\n autoDisposeTimeoutMs: this.options.autoDisposeTimeoutMs,\n onDispose: () => {\n delete ref.current;\n },\n });\n }\n\n return ref.current as QueryReference<TData>;\n }\n}\n"]}
1
+ {"version":3,"file":"SuspenseCache.js","sourceRoot":"","sources":["../../../src/react/cache/SuspenseCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAiB1D;IAIE,uBAAY,OAAmD;QAAnD,wBAAA,EAAA,UAAgC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QAHvD,cAAS,GAAG,IAAI,IAAI,CAAuC,aAAa,CAAC,CAAC;QAIhF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,mCAAW,GAAX,UACE,QAAkB,EAClB,gBAA8C;QAE9C,IAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,GAAG,CAAC,OAAO,GAAG,IAAI,sBAAsB,CAAC,gBAAgB,EAAE,EAAE;gBAC3D,GAAG,EAAE,QAAQ;gBACb,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,oBAAoB;gBACvD,SAAS,EAAE;oBACT,OAAO,GAAG,CAAC,OAAO,CAAC;gBACrB,CAAC;aACF,CAAC,CAAC;SACJ;QAED,OAAO,GAAG,CAAC,OAAwC,CAAC;IACtD,CAAC;IACH,oBAAC;AAAD,CAAC,AA1BD,IA0BC","sourcesContent":["import { Trie } from '@wry/trie';\nimport type { ObservableQuery } from '../../core';\nimport { canUseWeakMap } from '../../utilities';\nimport { InternalQueryReference } from './QueryReference';\nimport type { CacheKey } from './types';\n\ninterface SuspenseCacheOptions {\n /**\n * Specifies the amount of time, in milliseconds, the suspense cache will wait\n * for a suspended component to read from the suspense cache before it\n * automatically disposes of the query. This prevents memory leaks when a\n * component unmounts before a suspended resource finishes loading. Increase\n * the timeout if your queries take longer than than the specified time to\n * prevent your queries from suspending over and over.\n *\n * Defaults to 30 seconds.\n */\n autoDisposeTimeoutMs?: number;\n}\n\nexport class SuspenseCache {\n private queryRefs = new Trie<{ current?: InternalQueryReference }>(canUseWeakMap);\n private options: SuspenseCacheOptions;\n\n constructor(options: SuspenseCacheOptions = Object.create(null)) {\n this.options = options;\n }\n\n getQueryRef<TData = any>(\n cacheKey: CacheKey,\n createObservable: () => ObservableQuery<TData>\n ) {\n const ref = this.queryRefs.lookupArray(cacheKey);\n\n if (!ref.current) {\n ref.current = new InternalQueryReference(createObservable(), {\n key: cacheKey,\n autoDisposeTimeoutMs: this.options.autoDisposeTimeoutMs,\n onDispose: () => {\n delete ref.current;\n },\n });\n }\n\n return ref.current as InternalQueryReference<TData>;\n }\n}\n"]}
@@ -4,7 +4,7 @@ import { getApolloContext } from "./ApolloContext.js";
4
4
  export var ApolloConsumer = function (props) {
5
5
  var ApolloContext = getApolloContext();
6
6
  return (React.createElement(ApolloContext.Consumer, null, function (context) {
7
- invariant(context && context.client, 43);
7
+ invariant(context && context.client, 42);
8
8
  return props.children(context.client);
9
9
  }));
10
10
  };
@@ -5,7 +5,7 @@ var contextKey = canUseSymbol
5
5
  ? Symbol.for('__APOLLO_CONTEXT__')
6
6
  : '__APOLLO_CONTEXT__';
7
7
  export function getApolloContext() {
8
- invariant('createContext' in React, 44);
8
+ invariant('createContext' in React, 43);
9
9
  var contextStorage = global[contextKey] || (global[contextKey] = Object.create(null));
10
10
  return contextStorage[React.version] || (contextStorage[React.version] = Object.assign(React.createContext({}), { displayName: 'ApolloContext' }));
11
11
  }
@@ -9,7 +9,7 @@ export var ApolloProvider = function (_a) {
9
9
  var context = React.useMemo(function () {
10
10
  return __assign(__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });
11
11
  }, [parentContext, client, suspenseCache]);
12
- invariant(context.client, 45);
12
+ invariant(context.client, 44);
13
13
  return (React.createElement(ApolloContext.Provider, { value: context }, children));
14
14
  };
15
15
  //# sourceMappingURL=ApolloProvider.js.map
@@ -25,7 +25,7 @@ var contextKey = utilities.canUseSymbol
25
25
  ? Symbol.for('__APOLLO_CONTEXT__')
26
26
  : '__APOLLO_CONTEXT__';
27
27
  function getApolloContext() {
28
- globals.invariant('createContext' in React__namespace, 44);
28
+ globals.invariant('createContext' in React__namespace, 43);
29
29
  var contextStorage = globals.global[contextKey] || (globals.global[contextKey] = Object.create(null));
30
30
  return contextStorage[React__namespace.version] || (contextStorage[React__namespace.version] = Object.assign(React__namespace.createContext({}), { displayName: 'ApolloContext' }));
31
31
  }
@@ -34,7 +34,7 @@ var resetApolloContext = getApolloContext;
34
34
  var ApolloConsumer = function (props) {
35
35
  var ApolloContext = getApolloContext();
36
36
  return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
37
- globals.invariant(context && context.client, 43);
37
+ globals.invariant(context && context.client, 42);
38
38
  return props.children(context.client);
39
39
  }));
40
40
  };
@@ -46,7 +46,7 @@ var ApolloProvider = function (_a) {
46
46
  var context = React__namespace.useMemo(function () {
47
47
  return tslib.__assign(tslib.__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });
48
48
  }, [parentContext, client, suspenseCache]);
49
- globals.invariant(context.client, 45);
49
+ globals.invariant(context.client, 44);
50
50
  return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));
51
51
  };
52
52
 
@@ -1 +1 @@
1
- {"version":3,"file":"context.cjs","sources":["ApolloContext.js","ApolloConsumer.js","ApolloProvider.js"],"sourcesContent":["import * as React from 'react';\nimport { canUseSymbol } from '../../utilities';\nimport { global, invariant } from '../../utilities/globals';\nvar contextKey = canUseSymbol\n ? Symbol.for('__APOLLO_CONTEXT__')\n : '__APOLLO_CONTEXT__';\nexport function getApolloContext() {\n invariant('createContext' in React, 44);\n var contextStorage = global[contextKey] || (global[contextKey] = Object.create(null));\n return contextStorage[React.version] || (contextStorage[React.version] = Object.assign(React.createContext({}), { displayName: 'ApolloContext' }));\n}\nexport var resetApolloContext = getApolloContext;\n//# sourceMappingURL=ApolloContext.js.map","import { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport { getApolloContext } from './ApolloContext';\nexport var ApolloConsumer = function (props) {\n var ApolloContext = getApolloContext();\n return (React.createElement(ApolloContext.Consumer, null, function (context) {\n invariant(context && context.client, 43);\n return props.children(context.client);\n }));\n};\n//# sourceMappingURL=ApolloConsumer.js.map","import { __assign } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport { getApolloContext } from './ApolloContext';\nexport var ApolloProvider = function (_a) {\n var client = _a.client, suspenseCache = _a.suspenseCache, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = React.useContext(ApolloContext);\n var context = React.useMemo(function () {\n return __assign(__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });\n }, [parentContext, client, suspenseCache]);\n invariant(context.client, 45);\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map"],"names":["canUseSymbol","invariant","React","global","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,UAAU,GAAGA,sBAAY;AAC7B,MAAM,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACtC,MAAM,oBAAoB,CAAC;AACpB,SAAS,gBAAgB,GAAG;AACnC,IAAIC,iBAAS,CAAC,eAAe,IAAIC,gBAAK,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,IAAI,cAAc,GAAGC,cAAM,CAAC,UAAU,CAAC,KAAKA,cAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1F,IAAI,OAAO,cAAc,CAACD,gBAAK,CAAC,OAAO,CAAC,KAAK,cAAc,CAACA,gBAAK,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAACA,gBAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;AACvJ,CAAC;AACS,IAAC,kBAAkB,GAAG;;ACRtB,IAAC,cAAc,GAAG,UAAU,KAAK,EAAE;AAC7C,IAAI,IAAI,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC3C,IAAI,QAAQA,gBAAK,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE;AACjF,QAAQD,iBAAS,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjD,QAAQ,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9C,KAAK,CAAC,EAAE;AACR;;ACLU,IAAC,cAAc,GAAG,UAAU,EAAE,EAAE;AAC1C,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;AACrF,IAAI,IAAI,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC3C,IAAI,IAAI,aAAa,GAAGC,gBAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACxD,IAAI,IAAI,OAAO,GAAGA,gBAAK,CAAC,OAAO,CAAC,YAAY;AAC5C,QAAQ,OAAOE,cAAQ,CAACA,cAAQ,CAAC,EAAE,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,IAAI,aAAa,CAAC,aAAa,EAAE,CAAC,CAAC;AAC9J,KAAK,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AAC/C,IAAIH,iBAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAClC,IAAI,QAAQC,gBAAK,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE;AACvF;;;;;;;"}
1
+ {"version":3,"file":"context.cjs","sources":["ApolloContext.js","ApolloConsumer.js","ApolloProvider.js"],"sourcesContent":["import * as React from 'react';\nimport { canUseSymbol } from '../../utilities';\nimport { global, invariant } from '../../utilities/globals';\nvar contextKey = canUseSymbol\n ? Symbol.for('__APOLLO_CONTEXT__')\n : '__APOLLO_CONTEXT__';\nexport function getApolloContext() {\n invariant('createContext' in React, 43);\n var contextStorage = global[contextKey] || (global[contextKey] = Object.create(null));\n return contextStorage[React.version] || (contextStorage[React.version] = Object.assign(React.createContext({}), { displayName: 'ApolloContext' }));\n}\nexport var resetApolloContext = getApolloContext;\n//# sourceMappingURL=ApolloContext.js.map","import { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport { getApolloContext } from './ApolloContext';\nexport var ApolloConsumer = function (props) {\n var ApolloContext = getApolloContext();\n return (React.createElement(ApolloContext.Consumer, null, function (context) {\n invariant(context && context.client, 42);\n return props.children(context.client);\n }));\n};\n//# sourceMappingURL=ApolloConsumer.js.map","import { __assign } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport { getApolloContext } from './ApolloContext';\nexport var ApolloProvider = function (_a) {\n var client = _a.client, suspenseCache = _a.suspenseCache, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = React.useContext(ApolloContext);\n var context = React.useMemo(function () {\n return __assign(__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });\n }, [parentContext, client, suspenseCache]);\n invariant(context.client, 44);\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map"],"names":["canUseSymbol","invariant","React","global","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,UAAU,GAAGA,sBAAY;AAC7B,MAAM,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACtC,MAAM,oBAAoB,CAAC;AACpB,SAAS,gBAAgB,GAAG;AACnC,IAAIC,iBAAS,CAAC,eAAe,IAAIC,gBAAK,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,IAAI,cAAc,GAAGC,cAAM,CAAC,UAAU,CAAC,KAAKA,cAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1F,IAAI,OAAO,cAAc,CAACD,gBAAK,CAAC,OAAO,CAAC,KAAK,cAAc,CAACA,gBAAK,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAACA,gBAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;AACvJ,CAAC;AACS,IAAC,kBAAkB,GAAG;;ACRtB,IAAC,cAAc,GAAG,UAAU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25
25
  ? Symbol.for('__APOLLO_CONTEXT__')
26
26
  : '__APOLLO_CONTEXT__';
27
27
  function getApolloContext() {
28
- globals.invariant('createContext' in React__namespace, 44);
28
+ globals.invariant('createContext' in React__namespace, 43);
29
29
  var contextStorage = globals.global[contextKey] || (globals.global[contextKey] = Object.create(null));
30
30
  return contextStorage[React__namespace.version] || (contextStorage[React__namespace.version] = Object.assign(React__namespace.createContext({}), { displayName: 'ApolloContext' }));
31
31
  }
@@ -34,7 +34,7 @@ var resetApolloContext = getApolloContext;
34
34
  var ApolloConsumer = function (props) {
35
35
  var ApolloContext = getApolloContext();
36
36
  return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
37
- globals.invariant(context && context.client, 43);
37
+ globals.invariant(context && context.client, 42);
38
38
  return props.children(context.client);
39
39
  }));
40
40
  };
@@ -46,7 +46,7 @@ var ApolloProvider = function (_a) {
46
46
  var context = React__namespace.useMemo(function () {
47
47
  return tslib.__assign(tslib.__assign({}, parentContext), { client: client || parentContext.client, suspenseCache: suspenseCache || parentContext.suspenseCache });
48
48
  }, [parentContext, client, suspenseCache]);
49
- globals.invariant(context.client, 45);
49
+ globals.invariant(context.client, 44);
50
50
  return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));
51
51
  };
52
52
 
@@ -34,7 +34,7 @@ var GraphQLBase = (function (_super) {
34
34
  return _this;
35
35
  }
36
36
  GraphQLBase.prototype.getWrappedInstance = function () {
37
- invariant(this.withRef, 46);
37
+ invariant(this.withRef, 45);
38
38
  return this.wrappedInstance;
39
39
  };
40
40
  GraphQLBase.prototype.setWrappedInstance = function (ref) {
package/react/hoc/hoc.cjs CHANGED
@@ -59,7 +59,7 @@ var GraphQLBase = (function (_super) {
59
59
  return _this;
60
60
  }
61
61
  GraphQLBase.prototype.getWrappedInstance = function () {
62
- globals.invariant(this.withRef, 46);
62
+ globals.invariant(this.withRef, 45);
63
63
  return this.wrappedInstance;
64
64
  };
65
65
  GraphQLBase.prototype.setWrappedInstance = function (ref) {
@@ -290,7 +290,7 @@ function withApollo(WrappedComponent, operationOptions) {
290
290
  return _this;
291
291
  }
292
292
  WithApollo.prototype.getWrappedInstance = function () {
293
- globals.invariant(operationOptions.withRef, 47);
293
+ globals.invariant(operationOptions.withRef, 46);
294
294
  return this.wrappedInstance;
295
295
  };
296
296
  WithApollo.prototype.setWrappedInstance = function (ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"hoc.cjs","sources":["hoc-utils.js","query-hoc.js","mutation-hoc.js","subscription-hoc.js","graphql.js","withApollo.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nexport var defaultMapPropsToOptions = function () { return ({}); };\nexport var defaultMapResultToProps = function (props) { return props; };\nexport var defaultMapPropsToSkip = function () { return false; };\nexport function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\nexport function calculateVariablesFromProps(operation, props) {\n var variables = {};\n for (var _i = 0, _a = operation.variables; _i < _a.length; _i++) {\n var _b = _a[_i], variable = _b.variable, type = _b.type;\n if (!variable.name || !variable.name.value)\n continue;\n var variableName = variable.name.value;\n var variableProp = props[variableName];\n if (typeof variableProp !== 'undefined') {\n variables[variableName] = variableProp;\n continue;\n }\n if (type.kind !== 'NonNullType') {\n variables[variableName] = undefined;\n }\n }\n return variables;\n}\nvar GraphQLBase = (function (_super) {\n __extends(GraphQLBase, _super);\n function GraphQLBase(props) {\n var _this = _super.call(this, props) || this;\n _this.withRef = false;\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n return _this;\n }\n GraphQLBase.prototype.getWrappedInstance = function () {\n invariant(this.withRef, 46);\n return this.wrappedInstance;\n };\n GraphQLBase.prototype.setWrappedInstance = function (ref) {\n this.wrappedInstance = ref;\n };\n return GraphQLBase;\n}(React.Component));\nexport { GraphQLBase };\n//# sourceMappingURL=hoc-utils.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Query } from '../components';\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from './hoc-utils';\nexport function withQuery(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.skip, skip = _b === void 0 ? defaultMapPropsToSkip : _b, _c = operationOptions.alias, alias = _c === void 0 ? 'Apollo' : _c;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function') {\n mapPropsToOptions = function () { return options; };\n }\n var mapPropsToSkip = skip;\n if (typeof mapPropsToSkip !== 'function') {\n mapPropsToSkip = function () { return skip; };\n }\n var lastResultProps;\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GraphQL.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var shouldSkip = mapPropsToSkip(props);\n var opts = shouldSkip\n ? Object.create(null)\n : __assign({}, mapPropsToOptions(props));\n if (!shouldSkip && !opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Query, __assign({}, opts, { displayName: graphQLDisplayName, skip: shouldSkip, query: document }), function (_a) {\n var _b, _c;\n var _ = _a.client, data = _a.data, r = __rest(_a, [\"client\", \"data\"]);\n if (operationOptions.withRef) {\n _this.withRef = true;\n props = Object.assign({}, props, {\n ref: _this.setWrappedInstance\n });\n }\n if (shouldSkip) {\n return (React.createElement(WrappedComponent, __assign({}, props, {})));\n }\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'data';\n var childProps = (_b = {}, _b[name] = result, _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = result,\n _c.ownProps = props,\n _c);\n lastResultProps = operationOptions.props(newResult, lastResultProps);\n childProps = lastResultProps;\n }\n return (React.createElement(WrappedComponent, __assign({}, props, childProps)));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=query-hoc.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Mutation } from '../components';\nimport { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase } from './hoc-utils';\nexport function withMutation(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.alias, alias = _b === void 0 ? 'Apollo' : _b;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function')\n mapPropsToOptions = function () { return options; };\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GraphQL.prototype.render = function () {\n var props = this.props;\n var opts = mapPropsToOptions(props);\n if (operationOptions.withRef) {\n this.withRef = true;\n props = Object.assign({}, props, {\n ref: this.setWrappedInstance\n });\n }\n if (!opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Mutation, __assign({ ignoreResults: true }, opts, { mutation: document }), function (mutate, _a) {\n var _b, _c;\n var data = _a.data, r = __rest(_a, [\"data\"]);\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'mutate';\n var resultName = operationOptions.name\n ? \"\".concat(name, \"Result\")\n : 'result';\n var childProps = (_b = {},\n _b[name] = mutate,\n _b[resultName] = result,\n _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = mutate,\n _c[resultName] = result,\n _c.ownProps = props,\n _c);\n childProps = operationOptions.props(newResult);\n }\n return React.createElement(WrappedComponent, __assign({}, props, childProps));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=mutation-hoc.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Subscription } from '../components';\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from './hoc-utils';\nexport function withSubscription(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.skip, skip = _b === void 0 ? defaultMapPropsToSkip : _b, _c = operationOptions.alias, alias = _c === void 0 ? 'Apollo' : _c, shouldResubscribe = operationOptions.shouldResubscribe;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function')\n mapPropsToOptions = function () { return options; };\n var mapPropsToSkip = skip;\n if (typeof mapPropsToSkip !== 'function')\n mapPropsToSkip = function () { return skip; };\n var lastResultProps;\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL(props) {\n var _this = _super.call(this, props) || this;\n _this.state = { resubscribe: false };\n return _this;\n }\n GraphQL.prototype.updateResubscribe = function (resubscribe) {\n this.setState({ resubscribe: resubscribe });\n };\n GraphQL.prototype.componentDidUpdate = function (prevProps) {\n var resubscribe = !!(shouldResubscribe &&\n shouldResubscribe(prevProps, this.props));\n if (this.state.resubscribe !== resubscribe) {\n this.updateResubscribe(resubscribe);\n }\n };\n GraphQL.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var shouldSkip = mapPropsToSkip(props);\n var opts = shouldSkip\n ? Object.create(null)\n : mapPropsToOptions(props);\n if (!shouldSkip && !opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Subscription, __assign({}, opts, { displayName: graphQLDisplayName, skip: shouldSkip, subscription: document, shouldResubscribe: this.state.resubscribe }), function (_a) {\n var _b, _c;\n var data = _a.data, r = __rest(_a, [\"data\"]);\n if (operationOptions.withRef) {\n _this.withRef = true;\n props = Object.assign({}, props, {\n ref: _this.setWrappedInstance\n });\n }\n if (shouldSkip) {\n return (React.createElement(WrappedComponent, __assign({}, props, {})));\n }\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'data';\n var childProps = (_b = {}, _b[name] = result, _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = result,\n _c.ownProps = props,\n _c);\n lastResultProps = operationOptions.props(newResult, lastResultProps);\n childProps = lastResultProps;\n }\n return (React.createElement(WrappedComponent, __assign({}, props, childProps)));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=subscription-hoc.js.map","import { parser, DocumentType } from '../parser';\nimport { withQuery } from './query-hoc';\nimport { withMutation } from './mutation-hoc';\nimport { withSubscription } from './subscription-hoc';\nexport function graphql(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n switch (parser(document).type) {\n case DocumentType.Mutation:\n return withMutation(document, operationOptions);\n case DocumentType.Subscription:\n return withSubscription(document, operationOptions);\n case DocumentType.Query:\n default:\n return withQuery(document, operationOptions);\n }\n}\n//# sourceMappingURL=graphql.js.map","import { __assign, __extends } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { ApolloConsumer } from '../context';\nfunction getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\nexport function withApollo(WrappedComponent, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var withDisplayName = \"withApollo(\".concat(getDisplayName(WrappedComponent), \")\");\n var WithApollo = (function (_super) {\n __extends(WithApollo, _super);\n function WithApollo(props) {\n var _this = _super.call(this, props) || this;\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n return _this;\n }\n WithApollo.prototype.getWrappedInstance = function () {\n invariant(operationOptions.withRef, 47);\n return this.wrappedInstance;\n };\n WithApollo.prototype.setWrappedInstance = function (ref) {\n this.wrappedInstance = ref;\n };\n WithApollo.prototype.render = function () {\n var _this = this;\n return (React.createElement(ApolloConsumer, null, function (client) {\n var props = Object.assign({}, _this.props, {\n client: client,\n ref: operationOptions.withRef\n ? _this.setWrappedInstance\n : undefined\n });\n return React.createElement(WrappedComponent, __assign({}, props));\n }));\n };\n WithApollo.displayName = withDisplayName;\n WithApollo.WrappedComponent = WrappedComponent;\n return WithApollo;\n }(React.Component));\n return hoistNonReactStatics(WithApollo, WrappedComponent, {});\n}\n//# sourceMappingURL=withApollo.js.map"],"names":["getDisplayName","__extends","invariant","React","parser","__assign","Query","__rest","hoistNonReactStatics","Mutation","Subscription","DocumentType","ApolloConsumer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAI,wBAAwB,GAAG,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AAE5D,IAAI,qBAAqB,GAAG,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC;AAC1D,SAASA,gBAAc,CAAC,gBAAgB,EAAE;AACjD,IAAI,OAAO,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,IAAI,IAAI,WAAW,CAAC;AAChF,CAAC;AACM,SAAS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,IAAI,OAAOK,6BAAoB,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAClE;;;;;;;;"}
1
+ {"version":3,"file":"hoc.cjs","sources":["hoc-utils.js","query-hoc.js","mutation-hoc.js","subscription-hoc.js","graphql.js","withApollo.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nexport var defaultMapPropsToOptions = function () { return ({}); };\nexport var defaultMapResultToProps = function (props) { return props; };\nexport var defaultMapPropsToSkip = function () { return false; };\nexport function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\nexport function calculateVariablesFromProps(operation, props) {\n var variables = {};\n for (var _i = 0, _a = operation.variables; _i < _a.length; _i++) {\n var _b = _a[_i], variable = _b.variable, type = _b.type;\n if (!variable.name || !variable.name.value)\n continue;\n var variableName = variable.name.value;\n var variableProp = props[variableName];\n if (typeof variableProp !== 'undefined') {\n variables[variableName] = variableProp;\n continue;\n }\n if (type.kind !== 'NonNullType') {\n variables[variableName] = undefined;\n }\n }\n return variables;\n}\nvar GraphQLBase = (function (_super) {\n __extends(GraphQLBase, _super);\n function GraphQLBase(props) {\n var _this = _super.call(this, props) || this;\n _this.withRef = false;\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n return _this;\n }\n GraphQLBase.prototype.getWrappedInstance = function () {\n invariant(this.withRef, 45);\n return this.wrappedInstance;\n };\n GraphQLBase.prototype.setWrappedInstance = function (ref) {\n this.wrappedInstance = ref;\n };\n return GraphQLBase;\n}(React.Component));\nexport { GraphQLBase };\n//# sourceMappingURL=hoc-utils.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Query } from '../components';\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from './hoc-utils';\nexport function withQuery(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.skip, skip = _b === void 0 ? defaultMapPropsToSkip : _b, _c = operationOptions.alias, alias = _c === void 0 ? 'Apollo' : _c;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function') {\n mapPropsToOptions = function () { return options; };\n }\n var mapPropsToSkip = skip;\n if (typeof mapPropsToSkip !== 'function') {\n mapPropsToSkip = function () { return skip; };\n }\n var lastResultProps;\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GraphQL.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var shouldSkip = mapPropsToSkip(props);\n var opts = shouldSkip\n ? Object.create(null)\n : __assign({}, mapPropsToOptions(props));\n if (!shouldSkip && !opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Query, __assign({}, opts, { displayName: graphQLDisplayName, skip: shouldSkip, query: document }), function (_a) {\n var _b, _c;\n var _ = _a.client, data = _a.data, r = __rest(_a, [\"client\", \"data\"]);\n if (operationOptions.withRef) {\n _this.withRef = true;\n props = Object.assign({}, props, {\n ref: _this.setWrappedInstance\n });\n }\n if (shouldSkip) {\n return (React.createElement(WrappedComponent, __assign({}, props, {})));\n }\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'data';\n var childProps = (_b = {}, _b[name] = result, _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = result,\n _c.ownProps = props,\n _c);\n lastResultProps = operationOptions.props(newResult, lastResultProps);\n childProps = lastResultProps;\n }\n return (React.createElement(WrappedComponent, __assign({}, props, childProps)));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=query-hoc.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Mutation } from '../components';\nimport { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase } from './hoc-utils';\nexport function withMutation(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.alias, alias = _b === void 0 ? 'Apollo' : _b;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function')\n mapPropsToOptions = function () { return options; };\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GraphQL.prototype.render = function () {\n var props = this.props;\n var opts = mapPropsToOptions(props);\n if (operationOptions.withRef) {\n this.withRef = true;\n props = Object.assign({}, props, {\n ref: this.setWrappedInstance\n });\n }\n if (!opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Mutation, __assign({ ignoreResults: true }, opts, { mutation: document }), function (mutate, _a) {\n var _b, _c;\n var data = _a.data, r = __rest(_a, [\"data\"]);\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'mutate';\n var resultName = operationOptions.name\n ? \"\".concat(name, \"Result\")\n : 'result';\n var childProps = (_b = {},\n _b[name] = mutate,\n _b[resultName] = result,\n _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = mutate,\n _c[resultName] = result,\n _c.ownProps = props,\n _c);\n childProps = operationOptions.props(newResult);\n }\n return React.createElement(WrappedComponent, __assign({}, props, childProps));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=mutation-hoc.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { parser } from '../parser';\nimport { Subscription } from '../components';\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip } from './hoc-utils';\nexport function withSubscription(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var operation = parser(document);\n var _a = operationOptions.options, options = _a === void 0 ? defaultMapPropsToOptions : _a, _b = operationOptions.skip, skip = _b === void 0 ? defaultMapPropsToSkip : _b, _c = operationOptions.alias, alias = _c === void 0 ? 'Apollo' : _c, shouldResubscribe = operationOptions.shouldResubscribe;\n var mapPropsToOptions = options;\n if (typeof mapPropsToOptions !== 'function')\n mapPropsToOptions = function () { return options; };\n var mapPropsToSkip = skip;\n if (typeof mapPropsToSkip !== 'function')\n mapPropsToSkip = function () { return skip; };\n var lastResultProps;\n return function (WrappedComponent) {\n var graphQLDisplayName = \"\".concat(alias, \"(\").concat(getDisplayName(WrappedComponent), \")\");\n var GraphQL = (function (_super) {\n __extends(GraphQL, _super);\n function GraphQL(props) {\n var _this = _super.call(this, props) || this;\n _this.state = { resubscribe: false };\n return _this;\n }\n GraphQL.prototype.updateResubscribe = function (resubscribe) {\n this.setState({ resubscribe: resubscribe });\n };\n GraphQL.prototype.componentDidUpdate = function (prevProps) {\n var resubscribe = !!(shouldResubscribe &&\n shouldResubscribe(prevProps, this.props));\n if (this.state.resubscribe !== resubscribe) {\n this.updateResubscribe(resubscribe);\n }\n };\n GraphQL.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var shouldSkip = mapPropsToSkip(props);\n var opts = shouldSkip\n ? Object.create(null)\n : mapPropsToOptions(props);\n if (!shouldSkip && !opts.variables && operation.variables.length > 0) {\n opts.variables = calculateVariablesFromProps(operation, props);\n }\n return (React.createElement(Subscription, __assign({}, opts, { displayName: graphQLDisplayName, skip: shouldSkip, subscription: document, shouldResubscribe: this.state.resubscribe }), function (_a) {\n var _b, _c;\n var data = _a.data, r = __rest(_a, [\"data\"]);\n if (operationOptions.withRef) {\n _this.withRef = true;\n props = Object.assign({}, props, {\n ref: _this.setWrappedInstance\n });\n }\n if (shouldSkip) {\n return (React.createElement(WrappedComponent, __assign({}, props, {})));\n }\n var result = Object.assign(r, data || {});\n var name = operationOptions.name || 'data';\n var childProps = (_b = {}, _b[name] = result, _b);\n if (operationOptions.props) {\n var newResult = (_c = {},\n _c[name] = result,\n _c.ownProps = props,\n _c);\n lastResultProps = operationOptions.props(newResult, lastResultProps);\n childProps = lastResultProps;\n }\n return (React.createElement(WrappedComponent, __assign({}, props, childProps)));\n }));\n };\n GraphQL.displayName = graphQLDisplayName;\n GraphQL.WrappedComponent = WrappedComponent;\n return GraphQL;\n }(GraphQLBase));\n return hoistNonReactStatics(GraphQL, WrappedComponent, {});\n };\n}\n//# sourceMappingURL=subscription-hoc.js.map","import { parser, DocumentType } from '../parser';\nimport { withQuery } from './query-hoc';\nimport { withMutation } from './mutation-hoc';\nimport { withSubscription } from './subscription-hoc';\nexport function graphql(document, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n switch (parser(document).type) {\n case DocumentType.Mutation:\n return withMutation(document, operationOptions);\n case DocumentType.Subscription:\n return withSubscription(document, operationOptions);\n case DocumentType.Query:\n default:\n return withQuery(document, operationOptions);\n }\n}\n//# sourceMappingURL=graphql.js.map","import { __assign, __extends } from \"tslib\";\nimport { invariant } from '../../utilities/globals';\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { ApolloConsumer } from '../context';\nfunction getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n}\nexport function withApollo(WrappedComponent, operationOptions) {\n if (operationOptions === void 0) { operationOptions = {}; }\n var withDisplayName = \"withApollo(\".concat(getDisplayName(WrappedComponent), \")\");\n var WithApollo = (function (_super) {\n __extends(WithApollo, _super);\n function WithApollo(props) {\n var _this = _super.call(this, props) || this;\n _this.setWrappedInstance = _this.setWrappedInstance.bind(_this);\n return _this;\n }\n WithApollo.prototype.getWrappedInstance = function () {\n invariant(operationOptions.withRef, 46);\n return this.wrappedInstance;\n };\n WithApollo.prototype.setWrappedInstance = function (ref) {\n this.wrappedInstance = ref;\n };\n WithApollo.prototype.render = function () {\n var _this = this;\n return (React.createElement(ApolloConsumer, null, function (client) {\n var props = Object.assign({}, _this.props, {\n client: client,\n ref: operationOptions.withRef\n ? _this.setWrappedInstance\n : undefined\n });\n return React.createElement(WrappedComponent, __assign({}, props));\n }));\n };\n WithApollo.displayName = withDisplayName;\n WithApollo.WrappedComponent = WrappedComponent;\n return WithApollo;\n }(React.Component));\n return hoistNonReactStatics(WithApollo, WrappedComponent, {});\n}\n//# sourceMappingURL=withApollo.js.map"],"names":["getDisplayName","__extends","invariant","React","parser","__assign","Query","__rest","hoistNonReactStatics","Mutation","Subscription","DocumentType","ApolloConsumer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAI,wBAAwB,GAAG,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AAE5D,IAAI,qBAAqB,GAAG,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC;AAC1D,SAASA,gBAAc,CAAC,gBAAgB,EAAE;AACjD,IAAI,OAAO,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,IAAI,IAAI,WAAW,CAAC;AAChF,CAAC;AACM,SAAS,2BAA2B,CAAC,SAAS,EAAE,KAAK,EAAE;AAC9D,IAAI,IAAI,SAAS,GAAG,EAAE,CAAC;AACvB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAA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
61
  GraphQLBase.prototype.getWrappedInstance = function () {
62
- globals.invariant(this.withRef, 46);
62
+ globals.invariant(this.withRef, 45);
63
63
  return this.wrappedInstance;
64
64
  };
65
65
  GraphQLBase.prototype.setWrappedInstance = function (ref) {
@@ -290,7 +290,7 @@ function withApollo(WrappedComponent, operationOptions) {
290
290
  return _this;
291
291
  }
292
292
  WithApollo.prototype.getWrappedInstance = function () {
293
- globals.invariant(operationOptions.withRef, 47);
293
+ globals.invariant(operationOptions.withRef, 46);
294
294
  return this.wrappedInstance;
295
295
  };
296
296
  WithApollo.prototype.setWrappedInstance = function (ref) {
@@ -17,7 +17,7 @@ export function withApollo(WrappedComponent, operationOptions) {
17
17
  return _this;
18
18
  }
19
19
  WithApollo.prototype.getWrappedInstance = function () {
20
- invariant(operationOptions.withRef, 47);
20
+ invariant(operationOptions.withRef, 46);
21
21
  return this.wrappedInstance;
22
22
  };
23
23
  WithApollo.prototype.setWrappedInstance = function (ref) {