@apollo/client 3.8.4 → 3.8.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.
- package/apollo-client.cjs +168 -149
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +46 -11
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +46 -11
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +35 -0
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.js +4 -4
- package/cache/inmemory/readFromStore.js +2 -2
- package/cache/inmemory/writeToStore.js +4 -4
- package/core/ApolloClient.js +3 -3
- package/core/LocalState.js +2 -2
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +10 -11
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +0 -2
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +0 -2
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.js +11 -11
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +27 -30
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +27 -30
- package/dev/dev.cjs +124 -100
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +124 -100
- package/dev/loadErrorMessageHandler.js +2 -2
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/invariantErrorCodes.js +95 -80
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/http.cjs +3 -3
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +3 -3
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +1 -1
- package/package.json +22 -22
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +7 -2
- package/react/cache/QueryReference.js.map +1 -1
- package/react/cache/index.d.ts +0 -4
- package/react/cache/index.d.ts.map +1 -1
- package/react/cache/index.js +0 -14
- package/react/cache/index.js.map +1 -1
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/context.cjs +3 -3
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +3 -3
- package/react/hoc/hoc-utils.js +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/withApollo.js +1 -1
- package/react/hooks/hooks.cjs +15 -10
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +15 -10
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useQuery.js +1 -1
- package/react/hooks/useReadQuery.js +1 -1
- package/react/hooks/useSubscription.js +2 -2
- package/react/hooks/useSuspenseQuery.js +2 -2
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/index.d.ts +0 -1
- package/react/index.d.ts.map +1 -1
- package/react/index.js +0 -1
- package/react/index.js.map +1 -1
- package/react/parser/index.js +5 -5
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/react.cjs +1 -218
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +1 -218
- package/react/types/types.d.ts +0 -3
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +1 -1
- package/testing/core/mocking/mockLink.js +1 -1
- package/testing/internal/ObservableStream.d.ts +26 -0
- package/testing/internal/ObservableStream.d.ts.map +1 -0
- package/testing/internal/ObservableStream.js +101 -0
- package/testing/internal/ObservableStream.js.map +1 -0
- package/testing/internal/index.d.ts +1 -0
- package/testing/internal/index.d.ts.map +1 -1
- package/testing/internal/index.js +1 -0
- package/testing/internal/index.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +1 -0
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +2 -1
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +2 -1
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +2 -1
- package/utilities/globals/globals.cjs +29 -19
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +29 -19
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +28 -18
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +4 -4
- package/utilities/graphql/fragments.js +3 -3
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/storeUtils.d.ts +5 -0
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.d.ts +1 -1
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js +17 -34
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/utilities.cjs +36 -53
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +36 -53
- package/version.js +1 -1
|
@@ -19,7 +19,7 @@ function toPromise(observable) {
|
|
|
19
19
|
observable.subscribe({
|
|
20
20
|
next: function (data) {
|
|
21
21
|
if (completed) {
|
|
22
|
-
globalThis.__DEV__ !== false && globals.invariant.warn(
|
|
22
|
+
globalThis.__DEV__ !== false && globals.invariant.warn(42);
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
completed = true;
|
|
@@ -62,7 +62,7 @@ function validateOperation(operation) {
|
|
|
62
62
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
63
63
|
var key = _a[_i];
|
|
64
64
|
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
|
65
|
-
throw globals.newInvariantError(
|
|
65
|
+
throw globals.newInvariantError(43, key);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
return operation;
|
|
@@ -10,7 +10,7 @@ export function validateOperation(operation) {
|
|
|
10
10
|
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
|
11
11
|
var key = _a[_i];
|
|
12
12
|
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
|
13
|
-
throw newInvariantError(
|
|
13
|
+
throw newInvariantError(43, key);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
return operation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo/client",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.6",
|
|
4
4
|
"description": "A fully-featured caching GraphQL client.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"zen-observable-ts": "^1.2.5"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@arethetypeswrong/cli": "0.
|
|
70
|
-
"@babel/parser": "7.
|
|
69
|
+
"@arethetypeswrong/cli": "0.12.2",
|
|
70
|
+
"@babel/parser": "7.23.0",
|
|
71
71
|
"@changesets/changelog-github": "0.4.8",
|
|
72
72
|
"@changesets/cli": "2.26.2",
|
|
73
73
|
"@graphql-tools/schema": "10.0.0",
|
|
74
|
-
"@microsoft/api-extractor": "7.
|
|
74
|
+
"@microsoft/api-extractor": "7.38.0",
|
|
75
75
|
"@rollup/plugin-node-resolve": "11.2.1",
|
|
76
76
|
"@size-limit/esbuild-why": "8.2.6",
|
|
77
77
|
"@size-limit/preset-small-lib": "8.2.6",
|
|
@@ -83,33 +83,33 @@
|
|
|
83
83
|
"@types/bytes": "3.1.2",
|
|
84
84
|
"@types/fetch-mock": "7.3.6",
|
|
85
85
|
"@types/glob": "8.1.0",
|
|
86
|
-
"@types/hoist-non-react-statics": "3.3.
|
|
86
|
+
"@types/hoist-non-react-statics": "3.3.3",
|
|
87
87
|
"@types/jest": "29.5.5",
|
|
88
|
-
"@types/lodash": "4.14.
|
|
89
|
-
"@types/node": "20.6
|
|
90
|
-
"@types/node-fetch": "2.6.
|
|
91
|
-
"@types/react": "18.2.
|
|
92
|
-
"@types/react-dom": "18.2.
|
|
88
|
+
"@types/lodash": "4.14.199",
|
|
89
|
+
"@types/node": "20.8.6",
|
|
90
|
+
"@types/node-fetch": "2.6.6",
|
|
91
|
+
"@types/react": "18.2.28",
|
|
92
|
+
"@types/react-dom": "18.2.13",
|
|
93
93
|
"@types/use-sync-external-store": "0.0.4",
|
|
94
|
-
"@typescript-eslint/eslint-plugin": "6.7.
|
|
95
|
-
"@typescript-eslint/parser": "6.7.
|
|
96
|
-
"@typescript-eslint/rule-tester": "6.7.
|
|
97
|
-
"@typescript-eslint/types": "6.7.
|
|
98
|
-
"@typescript-eslint/utils": "6.7.
|
|
94
|
+
"@typescript-eslint/eslint-plugin": "6.7.5",
|
|
95
|
+
"@typescript-eslint/parser": "6.7.5",
|
|
96
|
+
"@typescript-eslint/rule-tester": "6.7.5",
|
|
97
|
+
"@typescript-eslint/types": "6.7.5",
|
|
98
|
+
"@typescript-eslint/utils": "6.7.5",
|
|
99
99
|
"acorn": "8.10.0",
|
|
100
100
|
"blob-polyfill": "7.0.20220408",
|
|
101
101
|
"bytes": "3.1.2",
|
|
102
102
|
"cross-fetch": "3.1.8",
|
|
103
|
-
"eslint": "8.
|
|
104
|
-
"eslint-import-resolver-typescript": "3.6.
|
|
103
|
+
"eslint": "8.51.0",
|
|
104
|
+
"eslint-import-resolver-typescript": "3.6.1",
|
|
105
105
|
"eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c",
|
|
106
106
|
"eslint-plugin-local-rules": "2.0.0",
|
|
107
107
|
"eslint-plugin-testing-library": "5.11.1",
|
|
108
|
-
"expect-type": "0.
|
|
108
|
+
"expect-type": "0.17.3",
|
|
109
109
|
"fetch-mock": "9.11.0",
|
|
110
110
|
"glob": "8.1.0",
|
|
111
111
|
"graphql": "16.8.1",
|
|
112
|
-
"graphql-ws": "5.14.
|
|
112
|
+
"graphql-ws": "5.14.1",
|
|
113
113
|
"jest": "29.7.0",
|
|
114
114
|
"jest-environment-jsdom": "29.7.0",
|
|
115
115
|
"jest-junit": "16.0.0",
|
|
@@ -122,14 +122,14 @@
|
|
|
122
122
|
"react-dom-17": "npm:react-dom@^17",
|
|
123
123
|
"react-error-boundary": "3.1.4",
|
|
124
124
|
"recast": "0.23.4",
|
|
125
|
-
"resolve": "1.22.
|
|
126
|
-
"rimraf": "5.0.
|
|
125
|
+
"resolve": "1.22.8",
|
|
126
|
+
"rimraf": "5.0.5",
|
|
127
127
|
"rollup": "2.79.1",
|
|
128
128
|
"rollup-plugin-terser": "7.0.2",
|
|
129
129
|
"rxjs": "7.8.1",
|
|
130
130
|
"size-limit": "8.2.6",
|
|
131
131
|
"subscriptions-transport-ws": "0.11.0",
|
|
132
|
-
"terser": "5.
|
|
132
|
+
"terser": "5.21.0",
|
|
133
133
|
"ts-api-utils": "1.0.3",
|
|
134
134
|
"ts-jest": "29.1.1",
|
|
135
135
|
"ts-jest-resolver": "2.0.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryReference.d.ts","sourceRoot":"","sources":["../../../src/react/cache/QueryReference.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,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,CACvC,eAAe,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CACpC,CAAC,CAAC,CAAC,CAAC;AAEL,QAAA,MAAM,sBAAsB,EAAE,OAAO,MAAiB,CAAC;AAMvD,MAAM,WAAW,cAAc,CAAC,KAAK,GAAG,OAAO;IAC7C,CAAC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,KAAK,CAAC,CAAC;CACzD;AAED,UAAU,6BAA6B;IACrC,GAAG,EAAE,QAAQ,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAChC,gBAAgB,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAC9C,cAAc,CAAC,KAAK,CAAC,CAEvB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAClC,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,GAC9B,sBAAsB,CAAC,KAAK,CAAC,CAE/B;AAED,QAAA,MAAM,wBAAwB,kHAOpB,CAAC;AAEX,KAAK,eAAe,GAAG,IAAI,CACzB,iBAAi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AAM,CAAyC;IAEvD,OAAO,CAAC,UAAU,CAAK;gBAGrB,UAAU,EAAE,eAAe,CAAC,KAAK,CAAC,EAClC,OAAO,EAAE,6BAA6B;IAuDxC,IAAI,iBAAiB,iDAEpB;IAED,MAAM;IAsBN,gBAAgB,CAAC,iBAAiB,EAAE,eAAe;IAOnD,YAAY,CAAC,iBAAiB,EAAE,eAAe;IAyB/C,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IAQhC,OAAO,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS;IAIjD,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAI1C,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,aAAa;CA2BtB"}
|
|
@@ -21,7 +21,6 @@ var OBSERVED_CHANGED_OPTIONS = [
|
|
|
21
21
|
var InternalQueryReference = (function () {
|
|
22
22
|
function InternalQueryReference(observable, options) {
|
|
23
23
|
var _this = this;
|
|
24
|
-
var _a;
|
|
25
24
|
this.listeners = new Set();
|
|
26
25
|
this.status = "loading";
|
|
27
26
|
this.references = 0;
|
|
@@ -55,7 +54,13 @@ var InternalQueryReference = (function () {
|
|
|
55
54
|
next: this.handleNext,
|
|
56
55
|
error: this.handleError,
|
|
57
56
|
});
|
|
58
|
-
|
|
57
|
+
var startDisposeTimer = function () {
|
|
58
|
+
var _a;
|
|
59
|
+
if (!_this.references) {
|
|
60
|
+
_this.autoDisposeTimeoutId = setTimeout(_this.dispose, (_a = options.autoDisposeTimeoutMs) !== null && _a !== void 0 ? _a : 30000);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
this.promise.then(startDisposeTimer, startDisposeTimer);
|
|
59
64
|
}
|
|
60
65
|
Object.defineProperty(InternalQueryReference.prototype, "watchQueryOptions", {
|
|
61
66
|
get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,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;QAO7B,eAAe;aACZ,IAAI,CAAC,UAAC,MAAM;;YACX,IAAI,KAAI,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC7B,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,MAAA,KAAI,CAAC,OAAO,sDAAG,MAAM,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;QAEnB,OAAO,eAAe,CAAC;IACzB,CAAC;IACH,6BAAC;AAAD,CAAC,AA3OD,IA2OC","sourcesContent":["import { equal } from \"@wry/equality\";\nimport type {\n ApolloError,\n ApolloQueryResult,\n ObservableQuery,\n OperationVariables,\n WatchQueryOptions,\n} from \"../../core/index.js\";\nimport { isNetworkRequestSettled } from \"../../core/index.js\";\nimport type { ObservableSubscription } from \"../../utilities/index.js\";\nimport {\n createFulfilledPromise,\n createRejectedPromise,\n} from \"../../utilities/index.js\";\nimport type { CacheKey } from \"./types.js\";\nimport type { useBackgroundQuery, useReadQuery } from \"../hooks/index.js\";\n\ntype Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;\n\ntype FetchMoreOptions<TData> = Parameters<\n ObservableQuery<TData>[\"fetchMore\"]\n>[0];\n\nconst 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\nexport function wrapQueryRef<TData>(\n internalQueryRef: InternalQueryReference<TData>\n): QueryReference<TData> {\n return { [QUERY_REFERENCE_SYMBOL]: internalQueryRef };\n}\n\nexport function unwrapQueryRef<TData>(\n queryRef: QueryReference<TData>\n): InternalQueryReference<TData> {\n return queryRef[QUERY_REFERENCE_SYMBOL];\n}\n\nconst OBSERVED_CHANGED_OPTIONS = [\n \"canonizeResults\",\n \"context\",\n \"errorPolicy\",\n \"fetchPolicy\",\n \"refetchWritePolicy\",\n \"returnPartialData\",\n] as const;\n\ntype ObservedOptions = Pick<\n WatchQueryOptions,\n (typeof OBSERVED_CHANGED_OPTIONS)[number]\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<CacheKey, 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 status: \"idle\" | \"loading\" = \"loading\";\n\n private resolve: ((result: ApolloQueryResult<TData>) => void) | undefined;\n private reject: ((error: unknown) => void) | undefined;\n\n private references = 0;\n\n constructor(\n observable: ObservableQuery<TData>,\n options: InternalQueryReferenceOptions\n ) {\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 // Don't save this result as last result to prevent delivery of last result\n // when first subscribing\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.watchQueryOptions.returnPartialData))\n ) {\n this.promise = createFulfilledPromise(this.result);\n this.status = \"idle\";\n } else {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n\n this.subscription = observable\n .filter(({ data }) => !equal(data, {}))\n .subscribe({\n next: this.handleNext,\n error: this.handleError,\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 retain() {\n this.references++;\n clearTimeout(this.autoDisposeTimeoutId);\n let disposed = false;\n\n return () => {\n if (disposed) {\n return;\n }\n\n disposed = true;\n this.references--;\n\n // Wait before fully disposing in case the app is running in strict mode.\n setTimeout(() => {\n if (!this.references) {\n this.dispose();\n }\n });\n };\n }\n\n didChangeOptions(watchQueryOptions: ObservedOptions) {\n return OBSERVED_CHANGED_OPTIONS.some(\n (option) =>\n !equal(this.watchQueryOptions[option], watchQueryOptions[option])\n );\n }\n\n applyOptions(watchQueryOptions: ObservedOptions) {\n const {\n fetchPolicy: currentFetchPolicy,\n canonizeResults: currentCanonizeResults,\n } = 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.initiateFetch(this.observable.reobserve(watchQueryOptions));\n } else {\n this.observable.silentSetOptions(watchQueryOptions);\n\n if (currentCanonizeResults !== watchQueryOptions.canonizeResults) {\n this.result = { ...this.result, ...this.observable.getCurrentResult() };\n this.promise = createFulfilledPromise(this.result);\n }\n }\n\n return this.promise;\n }\n\n listen(listener: Listener<TData>) {\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n refetch(variables: OperationVariables | undefined) {\n return this.initiateFetch(this.observable.refetch(variables));\n }\n\n fetchMore(options: FetchMoreOptions<TData>) {\n return this.initiateFetch(this.observable.fetchMore<TData>(options));\n }\n\n private 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 switch (this.status) {\n case \"loading\": {\n // Maintain the last successful `data` value if the next result does not\n // have one.\n if (result.data === void 0) {\n result.data = this.result.data;\n }\n this.status = \"idle\";\n this.result = result;\n this.resolve?.(result);\n break;\n }\n case \"idle\": {\n // This occurs when switching to a result that is fully cached when this\n // class is instantiated. ObservableQuery will run reobserve when\n // subscribing, which delivers a result from the cache.\n if (result.data === this.result.data) {\n return;\n }\n\n // Maintain the last successful `data` value if the next result does not\n // have one.\n if (result.data === void 0) {\n result.data = this.result.data;\n }\n\n this.result = result;\n this.promise = createFulfilledPromise(result);\n this.deliver(this.promise);\n break;\n }\n }\n }\n\n private handleError(error: ApolloError) {\n this.subscription.unsubscribe();\n this.subscription = this.observable.resubscribeAfterError(\n this.handleNext,\n this.handleError\n );\n\n switch (this.status) {\n case \"loading\": {\n this.status = \"idle\";\n this.reject?.(error);\n break;\n }\n case \"idle\": {\n this.promise = createRejectedPromise(error);\n this.deliver(this.promise);\n }\n }\n }\n\n private deliver(promise: Promise<ApolloQueryResult<TData>>) {\n this.listeners.forEach((listener) => listener(promise));\n }\n\n private initiateFetch(returnedPromise: Promise<ApolloQueryResult<TData>>) {\n this.status = \"loading\";\n\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n\n this.promise.catch(() => {});\n\n // If the data returned from the fetch is deeply equal to the data already\n // in the cache, `handleNext` will not be triggered leaving the promise we\n // created in a pending state forever. To avoid this situtation, we attempt\n // to resolve the promise if `handleNext` hasn't been run to ensure the\n // promise is resolved correctly.\n returnedPromise\n .then((result) => {\n if (this.status === \"loading\") {\n this.status = \"idle\";\n this.result = result;\n this.resolve?.(result);\n }\n })\n .catch(() => {});\n\n return returnedPromise;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"QueryReference.js","sourceRoot":"","sources":["../../../src/react/cache/QueryReference.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,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B,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;QAO7B,eAAe;aACZ,IAAI,CAAC,UAAC,MAAM;;YACX,IAAI,KAAI,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC7B,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,MAAA,KAAI,CAAC,OAAO,sDAAG,MAAM,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,cAAO,CAAC,CAAC,CAAC;QAEnB,OAAO,eAAe,CAAC;IACzB,CAAC;IACH,6BAAC;AAAD,CAAC,AApPD,IAoPC","sourcesContent":["import { equal } from \"@wry/equality\";\nimport type {\n ApolloError,\n ApolloQueryResult,\n ObservableQuery,\n OperationVariables,\n WatchQueryOptions,\n} from \"../../core/index.js\";\nimport { isNetworkRequestSettled } from \"../../core/index.js\";\nimport type { ObservableSubscription } from \"../../utilities/index.js\";\nimport {\n createFulfilledPromise,\n createRejectedPromise,\n} from \"../../utilities/index.js\";\nimport type { CacheKey } from \"./types.js\";\nimport type { useBackgroundQuery, useReadQuery } from \"../hooks/index.js\";\n\ntype Listener<TData> = (promise: Promise<ApolloQueryResult<TData>>) => void;\n\ntype FetchMoreOptions<TData> = Parameters<\n ObservableQuery<TData>[\"fetchMore\"]\n>[0];\n\nconst 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\nexport function wrapQueryRef<TData>(\n internalQueryRef: InternalQueryReference<TData>\n): QueryReference<TData> {\n return { [QUERY_REFERENCE_SYMBOL]: internalQueryRef };\n}\n\nexport function unwrapQueryRef<TData>(\n queryRef: QueryReference<TData>\n): InternalQueryReference<TData> {\n return queryRef[QUERY_REFERENCE_SYMBOL];\n}\n\nconst OBSERVED_CHANGED_OPTIONS = [\n \"canonizeResults\",\n \"context\",\n \"errorPolicy\",\n \"fetchPolicy\",\n \"refetchWritePolicy\",\n \"returnPartialData\",\n] as const;\n\ntype ObservedOptions = Pick<\n WatchQueryOptions,\n (typeof OBSERVED_CHANGED_OPTIONS)[number]\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<CacheKey, 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 status: \"idle\" | \"loading\" = \"loading\";\n\n private resolve: ((result: ApolloQueryResult<TData>) => void) | undefined;\n private reject: ((error: unknown) => void) | undefined;\n\n private references = 0;\n\n constructor(\n observable: ObservableQuery<TData>,\n options: InternalQueryReferenceOptions\n ) {\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 // Don't save this result as last result to prevent delivery of last result\n // when first subscribing\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.watchQueryOptions.returnPartialData))\n ) {\n this.promise = createFulfilledPromise(this.result);\n this.status = \"idle\";\n } else {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n\n this.subscription = observable\n .filter(({ data }) => !equal(data, {}))\n .subscribe({\n next: this.handleNext,\n error: this.handleError,\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 const startDisposeTimer = () => {\n if (!this.references) {\n this.autoDisposeTimeoutId = setTimeout(\n this.dispose,\n options.autoDisposeTimeoutMs ?? 30_000\n );\n }\n };\n\n // We wait until the request has settled to ensure we don't dispose of the\n // query ref before the request finishes, otherwise we would leave the\n // promise in a pending state rendering the suspense boundary indefinitely.\n this.promise.then(startDisposeTimer, startDisposeTimer);\n }\n\n get watchQueryOptions() {\n return this.observable.options;\n }\n\n retain() {\n this.references++;\n clearTimeout(this.autoDisposeTimeoutId);\n let disposed = false;\n\n return () => {\n if (disposed) {\n return;\n }\n\n disposed = true;\n this.references--;\n\n // Wait before fully disposing in case the app is running in strict mode.\n setTimeout(() => {\n if (!this.references) {\n this.dispose();\n }\n });\n };\n }\n\n didChangeOptions(watchQueryOptions: ObservedOptions) {\n return OBSERVED_CHANGED_OPTIONS.some(\n (option) =>\n !equal(this.watchQueryOptions[option], watchQueryOptions[option])\n );\n }\n\n applyOptions(watchQueryOptions: ObservedOptions) {\n const {\n fetchPolicy: currentFetchPolicy,\n canonizeResults: currentCanonizeResults,\n } = 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.initiateFetch(this.observable.reobserve(watchQueryOptions));\n } else {\n this.observable.silentSetOptions(watchQueryOptions);\n\n if (currentCanonizeResults !== watchQueryOptions.canonizeResults) {\n this.result = { ...this.result, ...this.observable.getCurrentResult() };\n this.promise = createFulfilledPromise(this.result);\n }\n }\n\n return this.promise;\n }\n\n listen(listener: Listener<TData>) {\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n refetch(variables: OperationVariables | undefined) {\n return this.initiateFetch(this.observable.refetch(variables));\n }\n\n fetchMore(options: FetchMoreOptions<TData>) {\n return this.initiateFetch(this.observable.fetchMore<TData>(options));\n }\n\n private 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 switch (this.status) {\n case \"loading\": {\n // Maintain the last successful `data` value if the next result does not\n // have one.\n if (result.data === void 0) {\n result.data = this.result.data;\n }\n this.status = \"idle\";\n this.result = result;\n this.resolve?.(result);\n break;\n }\n case \"idle\": {\n // This occurs when switching to a result that is fully cached when this\n // class is instantiated. ObservableQuery will run reobserve when\n // subscribing, which delivers a result from the cache.\n if (result.data === this.result.data) {\n return;\n }\n\n // Maintain the last successful `data` value if the next result does not\n // have one.\n if (result.data === void 0) {\n result.data = this.result.data;\n }\n\n this.result = result;\n this.promise = createFulfilledPromise(result);\n this.deliver(this.promise);\n break;\n }\n }\n }\n\n private handleError(error: ApolloError) {\n this.subscription.unsubscribe();\n this.subscription = this.observable.resubscribeAfterError(\n this.handleNext,\n this.handleError\n );\n\n switch (this.status) {\n case \"loading\": {\n this.status = \"idle\";\n this.reject?.(error);\n break;\n }\n case \"idle\": {\n this.promise = createRejectedPromise(error);\n this.deliver(this.promise);\n }\n }\n }\n\n private deliver(promise: Promise<ApolloQueryResult<TData>>) {\n this.listeners.forEach((listener) => listener(promise));\n }\n\n private initiateFetch(returnedPromise: Promise<ApolloQueryResult<TData>>) {\n this.status = \"loading\";\n\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n\n this.promise.catch(() => {});\n\n // If the data returned from the fetch is deeply equal to the data already\n // in the cache, `handleNext` will not be triggered leaving the promise we\n // created in a pending state forever. To avoid this situtation, we attempt\n // to resolve the promise if `handleNext` hasn't been run to ensure the\n // promise is resolved correctly.\n returnedPromise\n .then((result) => {\n if (this.status === \"loading\") {\n this.status = \"idle\";\n this.result = result;\n this.resolve?.(result);\n }\n })\n .catch(() => {});\n\n return returnedPromise;\n }\n}\n"]}
|
package/react/cache/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export type { SuspenseCacheOptions } from "./SuspenseCache.js";
|
|
2
2
|
export { getSuspenseCache } from "./getSuspenseCache.js";
|
|
3
|
-
import { SuspenseCache as RealSuspenseCache } from "./SuspenseCache.js";
|
|
4
|
-
export declare class SuspenseCache extends RealSuspenseCache {
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/react/cache/index.js
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
export { getSuspenseCache } from "./getSuspenseCache.js";
|
|
3
|
-
import { SuspenseCache as RealSuspenseCache } from "./SuspenseCache.js";
|
|
4
|
-
var SuspenseCache = (function (_super) {
|
|
5
|
-
__extends(SuspenseCache, _super);
|
|
6
|
-
function SuspenseCache() {
|
|
7
|
-
var _this = _super.call(this) || this;
|
|
8
|
-
throw new Error("It is no longer necessary to create a `SuspenseCache` instance and pass it into the `ApolloProvider`.\n" +
|
|
9
|
-
"Please remove this code from your application. \n\n" +
|
|
10
|
-
"This export will be removed with the final 3.8 release.");
|
|
11
|
-
return _this;
|
|
12
|
-
}
|
|
13
|
-
return SuspenseCache;
|
|
14
|
-
}(RealSuspenseCache));
|
|
15
|
-
export { SuspenseCache };
|
|
16
2
|
//# sourceMappingURL=index.js.map
|
package/react/cache/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/cache/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export type { SuspenseCacheOptions } from \"./SuspenseCache.js\";\nexport { getSuspenseCache } from \"./getSuspenseCache.js\";\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,
|
|
7
|
+
invariant(context && context.client, 44);
|
|
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,
|
|
8
|
+
invariant("createContext" in React, 45);
|
|
9
9
|
var context = React.createContext[contextKey];
|
|
10
10
|
if (!context) {
|
|
11
11
|
Object.defineProperty(React.createContext, contextKey, {
|
|
@@ -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 });
|
|
11
11
|
}, [parentContext, client]);
|
|
12
|
-
invariant(context.client,
|
|
12
|
+
invariant(context.client, 46);
|
|
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,
|
|
28
|
+
globals.invariant("createContext" in React__namespace, 45);
|
|
29
29
|
var context = React__namespace.createContext[contextKey];
|
|
30
30
|
if (!context) {
|
|
31
31
|
Object.defineProperty(React__namespace.createContext, contextKey, {
|
|
@@ -43,7 +43,7 @@ var resetApolloContext = getApolloContext;
|
|
|
43
43
|
var ApolloConsumer = function (props) {
|
|
44
44
|
var ApolloContext = getApolloContext();
|
|
45
45
|
return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
|
|
46
|
-
globals.invariant(context && context.client,
|
|
46
|
+
globals.invariant(context && context.client, 44);
|
|
47
47
|
return props.children(context.client);
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
@@ -55,7 +55,7 @@ var ApolloProvider = function (_a) {
|
|
|
55
55
|
var context = React__namespace.useMemo(function () {
|
|
56
56
|
return tslib.__assign(tslib.__assign({}, parentContext), { client: client || parentContext.client });
|
|
57
57
|
}, [parentContext, client]);
|
|
58
|
-
globals.invariant(context.client,
|
|
58
|
+
globals.invariant(context.client, 46);
|
|
59
59
|
return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -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/index.js\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nvar contextKey = canUseSymbol\n ? Symbol.for(\"__APOLLO_CONTEXT__\")\n : \"__APOLLO_CONTEXT__\";\nexport function getApolloContext() {\n invariant(\"createContext\" in React,
|
|
1
|
+
{"version":3,"file":"context.cjs","sources":["ApolloContext.js","ApolloConsumer.js","ApolloProvider.js"],"sourcesContent":["import * as React from \"react\";\nimport { canUseSymbol } from \"../../utilities/index.js\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nvar contextKey = canUseSymbol\n ? Symbol.for(\"__APOLLO_CONTEXT__\")\n : \"__APOLLO_CONTEXT__\";\nexport function getApolloContext() {\n invariant(\"createContext\" in React, 45);\n var context = React.createContext[contextKey];\n if (!context) {\n Object.defineProperty(React.createContext, contextKey, {\n value: (context = React.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = \"ApolloContext\";\n }\n return context;\n}\nexport var resetApolloContext = getApolloContext;\n//# sourceMappingURL=ApolloContext.js.map","import { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"react\";\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloConsumer = function (props) {\n var ApolloContext = getApolloContext();\n return (React.createElement(ApolloContext.Consumer, null, function (context) {\n invariant(context && context.client, 44);\n return props.children(context.client);\n }));\n};\n//# sourceMappingURL=ApolloConsumer.js.map","import { __assign } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"react\";\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloProvider = function (_a) {\n var client = _a.client, 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 });\n }, [parentContext, client]);\n invariant(context.client, 46);\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map"],"names":["canUseSymbol","invariant","React","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAI,UAAU,GAAGA,sBAAY;AAC7B,MAAM,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;AACtC,MA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C,gBAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACxD,IAAI,IAAI,OAAO,GAAGA,gBAAK,CAAC,OAAO,CAAC,YAAY;AAC5C,QAAQ,OAAOC,cAAQ,CAACA,cAAQ,CAAC,EAAE,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AACjG,KAAK,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;AAChC,IAAIF,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;;;;;;;"}
|
|
@@ -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,
|
|
28
|
+
globals.invariant("createContext" in React__namespace, 45);
|
|
29
29
|
var context = React__namespace.createContext[contextKey];
|
|
30
30
|
if (!context) {
|
|
31
31
|
Object.defineProperty(React__namespace.createContext, contextKey, {
|
|
@@ -43,7 +43,7 @@ var resetApolloContext = getApolloContext;
|
|
|
43
43
|
var ApolloConsumer = function (props) {
|
|
44
44
|
var ApolloContext = getApolloContext();
|
|
45
45
|
return (React__namespace.createElement(ApolloContext.Consumer, null, function (context) {
|
|
46
|
-
globals.invariant(context && context.client,
|
|
46
|
+
globals.invariant(context && context.client, 44);
|
|
47
47
|
return props.children(context.client);
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
@@ -55,7 +55,7 @@ var ApolloProvider = function (_a) {
|
|
|
55
55
|
var context = React__namespace.useMemo(function () {
|
|
56
56
|
return tslib.__assign(tslib.__assign({}, parentContext), { client: client || parentContext.client });
|
|
57
57
|
}, [parentContext, client]);
|
|
58
|
-
globals.invariant(context.client,
|
|
58
|
+
globals.invariant(context.client, 46);
|
|
59
59
|
return (React__namespace.createElement(ApolloContext.Provider, { value: context }, children));
|
|
60
60
|
};
|
|
61
61
|
|
package/react/hoc/hoc-utils.js
CHANGED
|
@@ -34,7 +34,7 @@ var GraphQLBase = (function (_super) {
|
|
|
34
34
|
return _this;
|
|
35
35
|
}
|
|
36
36
|
GraphQLBase.prototype.getWrappedInstance = function () {
|
|
37
|
-
invariant(this.withRef,
|
|
37
|
+
invariant(this.withRef, 47);
|
|
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,
|
|
62
|
+
globals.invariant(this.withRef, 47);
|
|
63
63
|
return this.wrappedInstance;
|
|
64
64
|
};
|
|
65
65
|
GraphQLBase.prototype.setWrappedInstance = function (ref) {
|
|
@@ -291,7 +291,7 @@ function withApollo(WrappedComponent, operationOptions) {
|
|
|
291
291
|
return _this;
|
|
292
292
|
}
|
|
293
293
|
WithApollo.prototype.getWrappedInstance = function () {
|
|
294
|
-
globals.invariant(operationOptions.withRef,
|
|
294
|
+
globals.invariant(operationOptions.withRef, 48);
|
|
295
295
|
return this.wrappedInstance;
|
|
296
296
|
};
|
|
297
297
|
WithApollo.prototype.setWrappedInstance = function (ref) {
|
package/react/hoc/hoc.cjs.map
CHANGED
|
@@ -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/index.js\";\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/index.js\";\nimport { Query } from \"../components/index.js\";\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip, } from \"./hoc-utils.js\";\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/index.js\";\nimport { Mutation } from \"../components/index.js\";\nimport { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase, } from \"./hoc-utils.js\";\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 () {\n return options;\n };\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/index.js\";\nimport { Subscription } from \"../components/index.js\";\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip, } from \"./hoc-utils.js\";\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 && 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/index.js\";\nimport { withQuery } from \"./query-hoc.js\";\nimport { withMutation } from \"./mutation-hoc.js\";\nimport { withSubscription } from \"./subscription-hoc.js\";\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/index.js\";\nimport * as React from \"react\";\nimport hoistNonReactStatics from \"hoist-non-react-statics\";\nimport { ApolloConsumer } from \"../context/index.js\";\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,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;A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O,EAAE,EAAE,CAAC,CAAC;AACpD,YAAY,OAAO,IAAI,CAAC,eAAe,CAAC;AACxC,SAAS,CAAC;AACV,QAAQ,UAAU,CAAC,SAAS,CAAC,kBAAkB,GAAG,UAAU,GAAG,EAAE;AACjE,YAAY,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;AACvC,SAAS,CAAC;AACV,QAAQ,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,YAAY;AAClD,YAAY,IAAI,KAAK,GAAG,IAAI,CAAC;AAC7B,YAAY,QAAQC,gBAAK,CAAC,aAAa,CAACS,sBAAc,EAAE,IAAI,EAAE,UAAU,MAAM,EAAE;AAChF,gBAAgB,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE;AAC3D,oBAAoB,MAAM,EAAE,MAAM;AAClC,oBAAoB,GAAG,EAAE,gBAAgB,CAAC,OAAO;AACjD,0BAA0B,KAAK,CAAC,kBAAkB;AAClD,0BAA0B,SAAS;AACnC,iBAAiB,CAAC,CAAC;AACnB,gBAAgB,OAAOT,gBAAK,CAAC,aAAa,CAAC,gBAAgB,EAAEE,cAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAClF,aAAa,CAAC,EAAE;AAChB,SAAS,CAAC;AACV,QAAQ,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC;AACjD,QAAQ,UAAU,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACvD,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK,CAACF,gBAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACxB,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/index.js\";\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, 47);\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/index.js\";\nimport { Query } from \"../components/index.js\";\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip, } from \"./hoc-utils.js\";\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/index.js\";\nimport { Mutation } from \"../components/index.js\";\nimport { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase, } from \"./hoc-utils.js\";\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 () {\n return options;\n };\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/index.js\";\nimport { Subscription } from \"../components/index.js\";\nimport { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip, } from \"./hoc-utils.js\";\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 && 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/index.js\";\nimport { withQuery } from \"./query-hoc.js\";\nimport { withMutation } from \"./mutation-hoc.js\";\nimport { withSubscription } from \"./subscription-hoc.js\";\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/index.js\";\nimport * as React from \"react\";\nimport hoistNonReactStatics from \"hoist-non-react-statics\";\nimport { ApolloConsumer } from \"../context/index.js\";\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, 48);\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,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,EAAE,EAA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62
|
-
globals.invariant(this.withRef,
|
|
62
|
+
globals.invariant(this.withRef, 47);
|
|
63
63
|
return this.wrappedInstance;
|
|
64
64
|
};
|
|
65
65
|
GraphQLBase.prototype.setWrappedInstance = function (ref) {
|
|
@@ -291,7 +291,7 @@ function withApollo(WrappedComponent, operationOptions) {
|
|
|
291
291
|
return _this;
|
|
292
292
|
}
|
|
293
293
|
WithApollo.prototype.getWrappedInstance = function () {
|
|
294
|
-
globals.invariant(operationOptions.withRef,
|
|
294
|
+
globals.invariant(operationOptions.withRef, 48);
|
|
295
295
|
return this.wrappedInstance;
|
|
296
296
|
};
|
|
297
297
|
WithApollo.prototype.setWrappedInstance = function (ref) {
|
package/react/hoc/withApollo.js
CHANGED
|
@@ -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,
|
|
20
|
+
invariant(operationOptions.withRef, 48);
|
|
21
21
|
return this.wrappedInstance;
|
|
22
22
|
};
|
|
23
23
|
WithApollo.prototype.setWrappedInstance = function (ref) {
|